};
struct blobmsg_hdr {
- uint8_t namelen;
+ uint16_t namelen;
uint8_t name[];
} __packed;
static inline void *blobmsg_data(struct blob_attr *attr)
{
struct blobmsg_hdr *hdr = blob_data(attr);
- return &hdr->name[blobmsg_hdrlen(hdr->namelen) - 1];
+ return (char *) hdr + blobmsg_hdrlen(hdr->namelen);
}
static inline int blobmsg_data_len(struct blob_attr *attr)
return blob_buf_init(buf, BLOBMSG_TYPE_TABLE);
}
+char *blobmsg_format_json(struct blob_attr *attr);
+
#endif