From c5c5817c337cd420356f660cde5740ed4c69f32f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 15 Mar 2011 15:26:27 +0200 Subject: [PATCH] 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. --- wpa_supplicant/wpa_cli.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c index 22023be42..f0ba62891 100644 --- a/wpa_supplicant/wpa_cli.c +++ b/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(); }