libubus: add UBUS_METHOD_NOARG
authorFelix Fietkau <nbd@openwrt.org>
Wed, 6 Mar 2013 15:56:33 +0000 (16:56 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 6 Mar 2013 15:56:33 +0000 (16:56 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
libubus.h

index a120eb6..bbed052 100644 (file)
--- a/libubus.h
+++ b/libubus.h
@@ -67,6 +67,12 @@ typedef void (*ubus_notify_complete_handler_t)(struct ubus_notify_request *req,
                .n_policy = ARRAY_SIZE(_policy)         \
        }
 
                .n_policy = ARRAY_SIZE(_policy)         \
        }
 
+#define UBUS_METHOD_NOARG(_name, _handler)             \
+       {                                               \
+               .name = _name,                          \
+               .handler = _handler,                    \
+       }
+
 struct ubus_method {
        const char *name;
        ubus_handler_t handler;
 struct ubus_method {
        const char *name;
        ubus_handler_t handler;