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>
This commit is contained in:
parent
8278138e67
commit
ba87329d96
2 changed files with 7 additions and 0 deletions
|
@ -40,6 +40,9 @@ endif
|
||||||
L_CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/misc/wifi/sockets\"
|
L_CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/misc/wifi/sockets\"
|
||||||
L_CFLAGS += -DCONFIG_CTRL_IFACE_DIR=\"/data/system/wpa_supplicant\"
|
L_CFLAGS += -DCONFIG_CTRL_IFACE_DIR=\"/data/system/wpa_supplicant\"
|
||||||
|
|
||||||
|
# Use Android specific directory for wpa_cli command completion history
|
||||||
|
L_CFLAGS += -DCONFIG_WPA_CLI_HISTORY_DIR=\"/data/misc/wifi\"
|
||||||
|
|
||||||
# To force sizeof(enum) = 4
|
# To force sizeof(enum) = 4
|
||||||
ifeq ($(TARGET_ARCH),arm)
|
ifeq ($(TARGET_ARCH),arm)
|
||||||
L_CFLAGS += -mabi=aapcs-linux
|
L_CFLAGS += -mabi=aapcs-linux
|
||||||
|
|
|
@ -3781,7 +3781,11 @@ static void start_edit(void)
|
||||||
ps = wpa_ctrl_get_remote_ifname(ctrl_conn);
|
ps = wpa_ctrl_get_remote_ifname(ctrl_conn);
|
||||||
#endif /* CONFIG_CTRL_IFACE_UDP_REMOTE */
|
#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");
|
home = getenv("HOME");
|
||||||
|
#endif /* CONFIG_WPA_CLI_HISTORY_DIR */
|
||||||
if (home) {
|
if (home) {
|
||||||
const char *fname = ".wpa_cli_history";
|
const char *fname = ".wpa_cli_history";
|
||||||
int hfile_len = os_strlen(home) + 1 + os_strlen(fname) + 1;
|
int hfile_len = os_strlen(home) + 1 + os_strlen(fname) + 1;
|
||||||
|
|
Loading…
Reference in a new issue