Signed-off-by: Felix Fietkau <nbd@openwrt.org>
[BLOBMSG_TYPE_INT32] = BLOB_ATTR_INT32,
[BLOBMSG_TYPE_INT64] = BLOB_ATTR_INT64,
[BLOBMSG_TYPE_STRING] = BLOB_ATTR_STRING,
+ [BLOBMSG_TYPE_UNSPEC] = BLOB_ATTR_BINARY,
};
static uint16_t
len = blobmsg_data_len(attr);
data = blobmsg_data(attr);
- if (!id || id > BLOBMSG_TYPE_LAST)
+ if (id > BLOBMSG_TYPE_LAST)
return false;
if (!blob_type[id])
data_str = buf;
switch(blob_id(attr)) {
+ case BLOBMSG_TYPE_UNSPEC:
+ sprintf(buf, "null");
+ break;
case BLOBMSG_TYPE_BOOL:
sprintf(buf, "%s", *(uint8_t *)data ? "true" : "false");
break;