summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libubus.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libubus.h b/libubus.h
index a120eb6..bbed052 100644
--- 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) \
}
+#define UBUS_METHOD_NOARG(_name, _handler) \
+ { \
+ .name = _name, \
+ .handler = _handler, \
+ }
+
struct ubus_method {
const char *name;
ubus_handler_t handler;