diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-01-23 22:06:03 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-01-23 22:06:03 +0300 |
commit | fcee2d56bca5ed08c4bfc996064e74e92ceb9137 (patch) | |
tree | ea9fdfbc7badc387da5bc26928201ddb086b003b /blobmsg.h | |
parent | 71f0be5e11b773ed4b09d1cc46099cdafacbd56a (diff) |
add blobmsg_name()
Diffstat (limited to 'blobmsg.h')
-rw-r--r-- | blobmsg.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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); |