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:
b1ea9af
)
add blobmsg_add_blob() to copy over an existing blobmsg attribute
author
Felix Fietkau
<nbd@openwrt.org>
Tue, 8 May 2012 13:59:19 +0000
(15:59 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Tue, 8 May 2012 13:59:19 +0000
(15:59 +0200)
blobmsg.h
patch
|
blob
|
history
diff --git
a/blobmsg.h
b/blobmsg.h
index
2813576
..
c47f469
100644
(file)
--- a/
blobmsg.h
+++ b/
blobmsg.h
@@
-117,6
+117,13
@@
blobmsg_add_string(struct blob_buf *buf, const char *name, const char *string)
return blobmsg_add_field(buf, BLOBMSG_TYPE_STRING, name, string, strlen(string) + 1);
}
return blobmsg_add_field(buf, BLOBMSG_TYPE_STRING, name, string, strlen(string) + 1);
}
+static inline int
+blobmsg_add_blob(struct blob_buf *buf, struct blob_attr *attr)
+{
+ return blobmsg_add_field(buf, blobmsg_type(attr), blobmsg_name(attr),
+ blobmsg_data(attr), blobmsg_data_len(attr));
+}
+
void *blobmsg_open_nested(struct blob_buf *buf, const char *name, bool array);
static inline void *
void *blobmsg_open_nested(struct blob_buf *buf, const char *name, bool array);
static inline void *