From fcee2d56bca5ed08c4bfc996064e74e92ceb9137 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 23 Jan 2011 20:06:03 +0100 Subject: [PATCH] add blobmsg_name() --- blobmsg.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/blobmsg.h b/blobmsg.h index 3085d00..8594add 100644 --- a/blobmsg.h +++ b/blobmsg.h @@ -49,6 +49,12 @@ static inline int blobmsg_hdrlen(int namelen) return BLOBMSG_PADDING(sizeof(struct blobmsg_hdr) + namelen + 1); } +static inline void *blobmsg_name(struct blob_attr *attr) +{ + struct blobmsg_hdr *hdr = blob_data(attr); + return &hdr->name; +} + static inline void *blobmsg_data(struct blob_attr *attr) { struct blobmsg_hdr *hdr = blob_data(attr);