aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_cli.c
diff options
context:
space:
mode:
authorMikael Kanstrup <mikael.kanstrup@sonymobile.com>2015-03-18 11:51:18 (GMT)
committerJouni Malinen <j@w1.fi>2015-03-26 13:29:13 (GMT)
commitba87329d9690fd75bcc036f60d877d1950898a7f (patch)
tree15710e3e72ee8e41c2c358a894794acafa19d0cf /wpa_supplicant/wpa_cli.c
parent8278138e679174b1ec8af7f169c2810a8888e202 (diff)
downloadhostap-ba87329d9690fd75bcc036f60d877d1950898a7f.zip
hostap-ba87329d9690fd75bcc036f60d877d1950898a7f.tar.gz
hostap-ba87329d9690fd75bcc036f60d877d1950898a7f.tar.bz2
wpa_cli: Use .wpa_cli_history under Android
wpa_cli already implements a command history file for easy accessing commands previously used. Enable the functionality on Android, too. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
Diffstat (limited to 'wpa_supplicant/wpa_cli.c')
-rw-r--r--wpa_supplicant/wpa_cli.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 2b40bbf..6e6cdf5 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -3781,7 +3781,11 @@ static void start_edit(void)
ps = wpa_ctrl_get_remote_ifname(ctrl_conn);
#endif /* CONFIG_CTRL_IFACE_UDP_REMOTE */
+#ifdef CONFIG_WPA_CLI_HISTORY_DIR
+ home = CONFIG_WPA_CLI_HISTORY_DIR;
+#else /* CONFIG_WPA_CLI_HISTORY_DIR */
home = getenv("HOME");
+#endif /* CONFIG_WPA_CLI_HISTORY_DIR */
if (home) {
const char *fname = ".wpa_cli_history";
int hfile_len = os_strlen(home) + 1 + os_strlen(fname) + 1;