From eac92a4d5d82eb31e712157e7eb425af728b2c43 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 3 Jan 2023 10:43:44 +0100 Subject: [PATCH] blobmsg: add blobmsg_parse_array_attr Wrapper around blobmsg_parse_array, similar to blobmsg_parse_attr Signed-off-by: Felix Fietkau --- blobmsg.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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