summaryrefslogtreecommitdiffstats
path: root/procd.c
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-11-18 11:41:04 +0100
committerJohn Crispin <blogic@openwrt.org>2013-11-18 11:41:04 +0100
commitd49096fea2499f118976fc6ad17e803847629eab (patch)
treeb81970c5d732d6179bb7c42609f6f0a42c52d5b5 /procd.c
parenteb7c76ede8d0d41c7139c704236c6111da56da46 (diff)
downloadunitd-d49096fea2499f118976fc6ad17e803847629eab.tar
unitd-d49096fea2499f118976fc6ad17e803847629eab.zip
add debug level handover between preinit and main process
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'procd.c')
-rw-r--r--procd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/procd.c b/procd.c
index a72912a..6fb0a72 100644
--- a/procd.c
+++ b/procd.c
@@ -32,7 +32,7 @@ static int usage(const char *prog)
"Options:\n"
"\t-s <path>\tPath to ubus socket\n"
"\t-h <path>\trun as hotplug daemon\n"
- "\td\t\tEnable debug messages\n"
+ "\t-d <level>\tEnable debug messages\n"
"\n", prog);
return 1;
}
@@ -41,7 +41,7 @@ int main(int argc, char **argv)
{
int ch;
- while ((ch = getopt(argc, argv, "ds:h:")) != -1) {
+ while ((ch = getopt(argc, argv, "d:s:h:")) != -1) {
switch (ch) {
case 'h':
return hotplug_run(optarg);
@@ -49,7 +49,7 @@ int main(int argc, char **argv)
ubus_socket = optarg;
break;
case 'd':
- debug++;
+ debug = atoi(optarg);
break;
default:
return usage(argv[0]);