From: Felix Fietkau Date: Tue, 3 Jan 2023 09:43:44 +0000 (+0100) Subject: blobmsg: add blobmsg_parse_array_attr X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=eac92a4d5d82eb31e712157e7eb425af728b2c43;p=project%2Flibubox.git blobmsg: add blobmsg_parse_array_attr Wrapper around blobmsg_parse_array, similar to blobmsg_parse_attr Signed-off-by: Felix Fietkau --- diff --git a/blobmsg.h b/blobmsg.h index a465ad5..f2fc0d0 100644 --- a/blobmsg.h +++ b/blobmsg.h @@ -182,7 +182,14 @@ static inline int blobmsg_parse_attr(const struct blobmsg_policy *policy, int policy_len, struct blob_attr **tb, struct blob_attr *data) { - return blobmsg_parse(policy, policy_len, tb, blobmsg_data(data), blobmsg_len(data)); + return blobmsg_parse(policy, policy_len, tb, blobmsg_data(data), blobmsg_len(data)); +} + +static inline int +blobmsg_parse_array_attr(const struct blobmsg_policy *policy, int policy_len, + struct blob_attr **tb, struct blob_attr *data) +{ + return blobmsg_parse_array(policy, policy_len, tb, blobmsg_data(data), blobmsg_len(data)); } static inline int