summaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-08-14 16:45:29 +0000
committerDenis Vlasenko2007-08-14 16:45:29 +0000
commit3d17d2b430a6a68c967b789c990cc441154d695e (patch)
treeb01535085348ea653c1c9d5ef3b525b461c02fc3 /networking/udhcp/dhcpc.c
parentdbe6e66d6a8addbbf9438f40a645be8ae105fa8a (diff)
downloadbusybox-3d17d2b430a6a68c967b789c990cc441154d695e.zip
busybox-3d17d2b430a6a68c967b789c990cc441154d695e.tar.gz
udhcpd: add -f "foreground" and -S "syslog" options
udhcpc: add -S "syslog" options remove CONFIG_FEATURE_UDHCP_SYSLOG function old new delta udhcpd_main 1168 1201 +33 udhcpc_main 2414 2425 +11 static.udhcpc_longopts 191 200 +9 qgravechar 112 108 -4 packed_usage 22843 22827 -16 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/2 up/down: 53/-20) Total: 33 bytes
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r--networking/udhcp/dhcpc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 0e89c3c..7cb1dfe 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -178,6 +178,7 @@ int udhcpc_main(int argc, char **argv)
OPT_T = 1 << 15,
OPT_t = 1 << 16,
OPT_v = 1 << 17,
+ OPT_S = 1 << 18,
};
#if ENABLE_GETOPT_LONG
static const char udhcpc_longopts[] ALIGN1 =
@@ -199,6 +200,7 @@ int udhcpc_main(int argc, char **argv)
"timeout\0" Required_argument "T"
"version\0" No_argument "v"
"retries\0" Required_argument "t"
+ "syslog\0" No_argument "S"
;
#endif
/* Default options. */
@@ -213,7 +215,7 @@ int udhcpc_main(int argc, char **argv)
#if ENABLE_GETOPT_LONG
applet_long_options = udhcpc_longopts;
#endif
- opt = getopt32(argc, argv, "c:CV:fbH:h:F:i:np:qRr:s:T:t:v",
+ opt = getopt32(argc, argv, "c:CV:fbH:h:F:i:np:qRr:s:T:t:vS",
&str_c, &str_V, &str_h, &str_h, &str_F,
&client_config.interface, &client_config.pidfile, &str_r,
&client_config.script, &str_T, &str_t
@@ -262,7 +264,7 @@ int udhcpc_main(int argc, char **argv)
return 0;
}
- if (ENABLE_FEATURE_UDHCP_SYSLOG) {
+ if (opt & OPT_S) {
openlog(applet_name, LOG_PID, LOG_LOCAL0);
logmode |= LOGMODE_SYSLOG;
}