]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - wpa_supplicant/main.c
wpa_supplicant: Print initialization information on startup
[thirdparty/hostap.git] / wpa_supplicant / main.c
index e196f3c4a42833f903ae4e388fed21e0dd072014..80aac77b5e8e90746df34fd245c9301e51d159b9 100644 (file)
@@ -2,14 +2,8 @@
  * WPA Supplicant / main() function for UNIX like OSes and MinGW
  * Copyright (c) 2003-2007, Jouni Malinen <j@w1.fi>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
  */
 
 #include "includes.h"
@@ -67,9 +61,13 @@ static void usage(void)
 #ifdef CONFIG_DEBUG_SYSLOG
        printf("  -s = log output to syslog instead of stdout\n");
 #endif /* CONFIG_DEBUG_SYSLOG */
+#ifdef CONFIG_DEBUG_LINUX_TRACING
+       printf("  -T = record to Linux tracing in addition to logging\n");
+       printf("       (records all messages regardless of debug verbosity)\n");
+#endif /* CONFIG_DEBUG_LINUX_TRACING */
        printf("  -t = include timestamp in debug messages\n"
               "  -h = show this help text\n"
-              "  -L = show license (GPL and BSD)\n"
+              "  -L = show license (BSD)\n"
               "  -o = override driver parameter for new interfaces\n"
               "  -O = override ctrl_interface parameter for new interfaces\n"
               "  -p = driver parameters\n"
@@ -145,7 +143,8 @@ int main(int argc, char *argv[])
        wpa_supplicant_fd_workaround();
 
        for (;;) {
-               c = getopt(argc, argv, "b:Bc:C:D:de:f:g:hi:KLNo:O:p:P:qstuvW");
+               c = getopt(argc, argv,
+                          "b:Bc:C:D:de:f:g:hi:KLNo:O:p:P:qsTtuvW");
                if (c < 0)
                        break;
                switch (c) {
@@ -220,6 +219,11 @@ int main(int argc, char *argv[])
                        params.wpa_debug_syslog++;
                        break;
 #endif /* CONFIG_DEBUG_SYSLOG */
+#ifdef CONFIG_DEBUG_LINUX_TRACING
+               case 'T':
+                       params.wpa_debug_tracing++;
+                       break;
+#endif /* CONFIG_DEBUG_LINUX_TRACING */
                case 't':
                        params.wpa_debug_timestamp++;
                        break;
@@ -258,6 +262,9 @@ int main(int argc, char *argv[])
                wpa_printf(MSG_ERROR, "Failed to initialize wpa_supplicant");
                exitcode = -1;
                goto out;
+       } else {
+               wpa_printf(MSG_INFO, "Successfully initialized "
+                          "wpa_supplicant");
        }
 
        for (i = 0; exitcode == 0 && i < iface_count; i++) {