diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-09-09 17:56:51 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-09-09 17:56:51 +0200 |
commit | 275a09d6c5ca1c1b03cfc74a5f856c7304adc80c (patch) | |
tree | 1fefe9e0fa5217a6a34280de655b3255b1c852ad /ubus.c | |
parent | 8ddaf5d7688b14590f283b2ebb81f78326fb39fd (diff) |
add an ubus call for restarting netifd
Diffstat (limited to 'ubus.c')
-rw-r--r-- | ubus.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -47,9 +47,19 @@ netifd_handle_device(struct ubus_context *ctx, struct ubus_object *obj, return 0; } +static int +netifd_handle_restart(struct ubus_context *ctx, struct ubus_object *obj, + struct ubus_request_data *req, const char *method, + struct blob_attr *msg) +{ + netifd_restart(); + return 0; +} + static struct ubus_method main_object_methods[] = { UBUS_METHOD("add_device", netifd_handle_device, dev_policy), UBUS_METHOD("remove_device", netifd_handle_device, dev_policy), + { .name = "restart", .handler = netifd_handle_restart }, }; static struct ubus_object_type main_object_type = |