Browse Source

wpa_cli: Allow wpa_supplicant control interface default to be changed

CONFIG_CTRL_IFACE_DIR can now be defined to modify the default directory
wpa_cli uses for the wpa_supplicant control interface.
Jouni Malinen 14 years ago
parent
commit
c5c5817c33
1 changed files with 5 additions and 2 deletions
  1. 5 2
      wpa_supplicant/wpa_cli.c

+ 5 - 2
wpa_supplicant/wpa_cli.c

@@ -93,7 +93,10 @@ static int wpa_cli_quit = 0;
 static int wpa_cli_attached = 0;
 static int wpa_cli_connected = 0;
 static int wpa_cli_last_id = 0;
-static const char *ctrl_iface_dir = "/var/run/wpa_supplicant";
+#ifndef CONFIG_CTRL_IFACE_DIR
+#define CONFIG_CTRL_IFACE_DIR "/var/run/wpa_supplicant"
+#endif /* CONFIG_CTRL_IFACE_DIR */
+static const char *ctrl_iface_dir = CONFIG_CTRL_IFACE_DIR;
 static char *ctrl_ifname = NULL;
 static const char *pid_file = NULL;
 static const char *action_file = NULL;
@@ -117,7 +120,7 @@ static void usage(void)
 	       "events from\n"
 	       "       wpa_supplicant\n"
 	       "  -B = run a daemon in the background\n"
-	       "  default path: /var/run/wpa_supplicant\n"
+	       "  default path: " CONFIG_CTRL_IFACE_DIR "\n"
 	       "  default interface: first interface found in socket path\n");
 	print_help();
 }