diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-02-17 19:42:12 +0400 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-02-17 19:42:12 +0400 |
commit | af2f52a37bdbb34835da08b518a5f5a950d87a77 (patch) | |
tree | c98d6d01803a26767c7deafad0489ed2af3a089f /blobmsg.h | |
parent | bd47d85d38ee5fb1fb8a37d006f51443f67a2061 (diff) |
blobmsg: implement blobmsg_printf and blobmsg_vprintf
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'blobmsg.h')
-rw-r--r-- | blobmsg.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -16,6 +16,7 @@ #ifndef __BLOBMSG_H #define __BLOBMSG_H +#include <stdarg.h> #include "blob.h" #define BLOBMSG_ALIGN 2 @@ -195,6 +196,11 @@ void *blobmsg_alloc_string_buffer(struct blob_buf *buf, const char *name, int ma void *blobmsg_realloc_string_buffer(struct blob_buf *buf, int maxlen); void blobmsg_add_string_buffer(struct blob_buf *buf); +void blobmsg_vprintf(struct blob_buf *buf, const char *name, const char *format, va_list arg); +void blobmsg_printf(struct blob_buf *buf, const char *name, const char *format, ...) + __attribute__((format(printf, 3, 4))); + + /* blobmsg to json formatting */ #define blobmsg_for_each_attr(pos, attr, rem) \ |