From 8cada85b610b40a8c25477985ff5c1d26ef452d0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 12 Sep 2011 13:37:53 +0200 Subject: [PATCH] add a blobmsg_type() inline function --- blobmsg.h | 5 +++++ 1 file changed, 5 insertions(+) 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);