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-01-30 16:15:57 +0300
committerFelix Fietkau <nbd@openwrt.org>2011-01-30 16:15:57 +0300
commitda2876acd93e2471db455c253b20619e523a9694 (patch)
tree2a0008e7722985985b33069be8b373800fa913b2 /blobmsg.h
parentff585b97c0b061d3ef7a026a331fa0079e0a7d94 (diff)
add support for json-formatting blobmsg elements
Diffstat (limited to 'blobmsg.h')
-rw-r--r--blobmsg.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/blobmsg.h b/blobmsg.h
index 554bed8..7c63dbf 100644
--- a/blobmsg.h
+++ b/blobmsg.h
@@ -49,10 +49,10 @@ 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)
+static inline char *blobmsg_name(struct blob_attr *attr)
{
struct blobmsg_hdr *hdr = blob_data(attr);
- return &hdr->name;
+ return (char *) hdr->name;
}
static inline void *blobmsg_data(struct blob_attr *attr)
@@ -139,7 +139,7 @@ static inline int blobmsg_buf_init(struct blob_buf *buf)
return blob_buf_init(buf, BLOBMSG_TYPE_TABLE);
}
-char *blobmsg_format_json(struct blob_attr *attr, bool named);
+char *blobmsg_format_json(struct blob_attr *attr, bool list);
#define blobmsg_for_each_attr(pos, attr, rem) \
for (rem = blobmsg_data_len(attr), pos = blobmsg_data(attr); \