diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-09-09 20:25:17 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-09-09 20:25:17 +0200 |
commit | cfc905f003aefe4735f8645c561f789ffd0b1f30 (patch) | |
tree | 939ccbfeb309a9eb1d90239d5651cad8d5ff25af | |
parent | 82bd6990581a6a424fcabe8e5da9af885d531e07 (diff) |
add an option for selecting the main path for netifd addons
-rw-r--r-- | main.c | 7 | ||||
-rw-r--r-- | netifd.h | 1 |
2 files changed, 7 insertions, 1 deletions
@@ -7,6 +7,7 @@ #include "ubus.h" #include "config.h" +const char *main_path = "."; static char **global_argv; static void netifd_do_restart(struct uloop_timeout *timeout) @@ -28,7 +29,8 @@ static int usage(const char *progname) fprintf(stderr, "Usage: %s [options]\n" "Options:\n" " -s <path>: Path to the ubus socket\n" - "\n", progname); + " -p <path>: Path to netifd addons (default: %s)\n" + "\n", progname, main_path); return 1; } @@ -45,6 +47,9 @@ int main(int argc, char **argv) case 's': socket = optarg; break; + case 'p': + main_path = optarg; + break; default: return usage(argv[0]); } @@ -16,6 +16,7 @@ struct device; struct interface; +extern const char *main_path; void netifd_restart(void); #endif |