Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-09-12 15:37:53 +0400
committerFelix Fietkau <nbd@openwrt.org>2011-09-12 15:37:53 +0400
commit8cada85b610b40a8c25477985ff5c1d26ef452d0 (patch)
tree80678fc4ec55af5175bf971f17e7b50862e53cdb /blobmsg.h
parent738884e7469969a0b30a077820f60ff0a1e37ac2 (diff)
add a blobmsg_type() inline function
Diffstat (limited to 'blobmsg.h')
-rw-r--r--blobmsg.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/blobmsg.h b/blobmsg.h
index 0b4565f..a63fcad 100644
--- a/blobmsg.h
+++ b/blobmsg.h
@@ -56,6 +56,11 @@ static inline const char *blobmsg_name(const struct blob_attr *attr)
return (const char *) hdr->name;
}
+static inline int blobmsg_type(const struct blob_attr *attr)
+{
+ return blob_id(attr);
+}
+
static inline void *blobmsg_data(const struct blob_attr *attr)
{
struct blobmsg_hdr *hdr = blob_data(attr);