projects
/
project
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed9b5c9
)
add BLOBMSG_TYPE_BOOL as an alias for BLOBMSG_TYPE_INT8
author
Felix Fietkau
<nbd@openwrt.org>
Fri, 29 Jul 2011 10:56:18 +0000
(12:56 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 29 Jul 2011 10:56:48 +0000
(12:56 +0200)
blobmsg.h
patch
|
blob
|
history
blobmsg_json.c
patch
|
blob
|
history
diff --git
a/blobmsg.h
b/blobmsg.h
index
e9a0b69
..
2fb61d4
100644
(file)
--- a/
blobmsg.h
+++ b/
blobmsg.h
@@
-31,7
+31,8
@@
enum blobmsg_type {
BLOBMSG_TYPE_INT16,
BLOBMSG_TYPE_INT8,
__BLOBMSG_TYPE_LAST,
- BLOBMSG_TYPE_LAST = __BLOBMSG_TYPE_LAST - 1
+ BLOBMSG_TYPE_LAST = __BLOBMSG_TYPE_LAST - 1,
+ BLOBMSG_TYPE_BOOL = BLOBMSG_TYPE_INT8,
};
struct blobmsg_hdr {
diff --git
a/blobmsg_json.c
b/blobmsg_json.c
index
0539bd1
..
3053fa3
100644
(file)
--- a/
blobmsg_json.c
+++ b/
blobmsg_json.c
@@
-228,7
+228,7
@@
static void blobmsg_format_element(struct strbuf *s, struct blob_attr *attr, boo
data_str = buf;
switch(blob_id(attr)) {
- case BLOBMSG_TYPE_
INT8
:
+ case BLOBMSG_TYPE_
BOOL
:
sprintf(buf, "%s", *(uint8_t *)data ? "true" : "false");
break;
case BLOBMSG_TYPE_INT32: