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
This commit is contained in:
Sam Leffler 2008-03-25 21:47:03 +00:00
parent 523da39bcc
commit 2e76e92b45
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=177620
2 changed files with 13 additions and 2 deletions

View File

@ -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;

View File

@ -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();
}