summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2008-03-25 21:47:03 +0000
committersam <sam@FreeBSD.org>2008-03-25 21:47:03 +0000
commit268354d5164d4b1e0a9a1abef4452b9e61700182 (patch)
treee99724b45f0953cd50da75bfd56a4647eccff784 /contrib
parent5e698c9f5e3fbe1e9ba5270ea8ca2057572a101b (diff)
downloadFreeBSD-src-268354d5164d4b1e0a9a1abef4452b9e61700182.zip
FreeBSD-src-268354d5164d4b1e0a9a1abef4452b9e61700182.tar.gz
fix botched merge of syslog support to the vendor branch; these files
were off the branch so we need to pull the changes back up
Diffstat (limited to 'contrib')
-rw-r--r--contrib/wpa_supplicant/main.c12
-rw-r--r--contrib/wpa_supplicant/wpa_supplicant.c3
2 files changed, 13 insertions, 2 deletions
diff --git a/contrib/wpa_supplicant/main.c b/contrib/wpa_supplicant/main.c
index 8ce4ef2..aaef822 100644
--- a/contrib/wpa_supplicant/main.c
+++ b/contrib/wpa_supplicant/main.c
@@ -41,7 +41,7 @@ static void usage(void)
int i;
printf("%s\n\n%s\n"
"usage:\n"
- " wpa_supplicant [-BddhKLqqtuvwW] [-P<pid file>] "
+ " wpa_supplicant [-BddhKLqqstuvwW] [-P<pid file>] "
"[-g<global ctrl>] \\\n"
" -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] "
"[-p<driver_param>] \\\n"
@@ -79,6 +79,9 @@ static void usage(void)
printf(" -p = driver parameters\n"
" -P = PID file\n"
" -q = decrease debugging verbosity (-qq even less)\n"
+#ifdef CONFIG_DEBUG_SYSLOG
+ " -s = log output to syslog instead of stdout\n"
+#endif /* CONFIG_DEBUG_SYSLOG */
#ifdef CONFIG_CTRL_IFACE_DBUS
" -u = enable DBus control interface\n"
#endif /* CONFIG_CTRL_IFACE_DBUS */
@@ -149,7 +152,7 @@ int main(int argc, char *argv[])
wpa_supplicant_fd_workaround();
for (;;) {
- c = getopt(argc, argv, "b:Bc:C:D:df:g:hi:KLNp:P:qtuvwW");
+ c = getopt(argc, argv, "b:Bc:C:D:df:g:hi:KLNp:P:qstuvwW");
if (c < 0)
break;
switch (c) {
@@ -210,6 +213,11 @@ int main(int argc, char *argv[])
case 'q':
params.wpa_debug_level++;
break;
+#ifdef CONFIG_DEBUG_SYSLOG
+ case 's':
+ params.wpa_debug_syslog++;
+ break;
+#endif /* CONFIG_DEBUG_SYSLOG */
case 't':
params.wpa_debug_timestamp++;
break;
diff --git a/contrib/wpa_supplicant/wpa_supplicant.c b/contrib/wpa_supplicant/wpa_supplicant.c
index 761445c..95c8b1b 100644
--- a/contrib/wpa_supplicant/wpa_supplicant.c
+++ b/contrib/wpa_supplicant/wpa_supplicant.c
@@ -2490,6 +2490,8 @@ struct wpa_global * wpa_supplicant_init(struct wpa_params *params)
return NULL;
wpa_debug_open_file(params->wpa_debug_file_path);
+ if (params->wpa_debug_syslog)
+ wpa_debug_open_syslog();
ret = eap_peer_register_methods();
if (ret) {
@@ -2614,5 +2616,6 @@ void wpa_supplicant_deinit(struct wpa_global *global)
os_free(global->params.ctrl_interface);
os_free(global);
+ wpa_debug_close_syslog();
wpa_debug_close_file();
}
OpenPOWER on IntegriCloud