From 914ef8f6b002c8c57c54b8c8376facac25e1c551 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 20 Oct 2013 13:19:51 +0200 Subject: [PATCH] blobmsg: add blobmsg_len() for consistency (similar to blob_len) Signed-off-by: Felix Fietkau --- blobmsg.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/blobmsg.h b/blobmsg.h index 1e497f7..4619643 100644 --- a/blobmsg.h +++ b/blobmsg.h @@ -78,6 +78,11 @@ static inline int blobmsg_data_len(const struct blob_attr *attr) return blob_len(attr) - (end - start); } +static inline int blobmsg_len(const struct blob_attr *attr) +{ + return blobmsg_data_len(attr); +} + bool blobmsg_check_attr(const struct blob_attr *attr, bool name); bool blobmsg_check_attr_list(const struct blob_attr *attr, int type); int blobmsg_parse(const struct blobmsg_policy *policy, int policy_len, -- 2.11.0