projects
/
project
/
uci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2549fb8
)
blob: add support for u64
author
Steven Barth
<steven@midlink.org>
Tue, 18 Feb 2014 09:15:49 +0000
(10:15 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Tue, 18 Feb 2014 11:40:08 +0000
(12:40 +0100)
blob.c
patch
|
blob
|
history
diff --git
a/blob.c
b/blob.c
index ad72652cfc44092dc31571af71e30618263b10c4..c8e5dc90c80a342a4bf5bdce0a11d23f0a25a71f 100644
(file)
--- a/
blob.c
+++ b/
blob.c
@@
-25,6
+25,7
@@
uci_attr_to_blob(struct blob_buf *b, const char *str,
{
char *err;
int intval;
+ long long llval;
switch (type) {
case BLOBMSG_TYPE_STRING:
@@
-47,6
+48,13
@@
uci_attr_to_blob(struct blob_buf *b, const char *str,
blobmsg_add_u32(b, name, intval);
break;
+ case BLOBMSG_TYPE_INT64:
+ llval = strtoll(str, &err, 0);
+ if (*err)
+ return false;
+
+ blobmsg_add_u64(b, name, llval);
+ break;
default:
return false;
}