projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
82bd699
)
add an option for selecting the main path for netifd addons
author
Felix Fietkau
<nbd@openwrt.org>
Fri, 9 Sep 2011 18:25:17 +0000
(20:25 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 9 Sep 2011 18:25:17 +0000
(20:25 +0200)
main.c
patch
|
blob
|
history
netifd.h
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index
d1f976d
..
da5ae09
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-7,6
+7,7
@@
#include "ubus.h"
#include "config.h"
#include "ubus.h"
#include "config.h"
+const char *main_path = ".";
static char **global_argv;
static void netifd_do_restart(struct uloop_timeout *timeout)
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"
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;
}
return 1;
}
@@
-45,6
+47,9
@@
int main(int argc, char **argv)
case 's':
socket = optarg;
break;
case 's':
socket = optarg;
break;
+ case 'p':
+ main_path = optarg;
+ break;
default:
return usage(argv[0]);
}
default:
return usage(argv[0]);
}
diff --git
a/netifd.h
b/netifd.h
index
916b79e
..
be29b3c
100644
(file)
--- a/
netifd.h
+++ b/
netifd.h
@@
-16,6
+16,7
@@
struct device;
struct interface;
struct device;
struct interface;
+extern const char *main_path;
void netifd_restart(void);
#endif
void netifd_restart(void);
#endif