aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/main.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-04-01 15:17:24 (GMT)
committerJouni Malinen <j@w1.fi>2013-04-01 15:17:24 (GMT)
commitcd61936a4a7d244528213a69a492a29ca82ec42b (patch)
tree3e48270a07d758e974a5be5d5d73c7220ac34608 /hostapd/main.c
parent17b8995cf5813d7c027cd7a6884700e791d72392 (diff)
downloadhostap-cd61936a4a7d244528213a69a492a29ca82ec42b.zip
hostap-cd61936a4a7d244528213a69a492a29ca82ec42b.tar.gz
hostap-cd61936a4a7d244528213a69a492a29ca82ec42b.tar.bz2
hostapd: Show more helpful message for -g and -G errors
Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'hostapd/main.c')
-rw-r--r--hostapd/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/hostapd/main.c b/hostapd/main.c
index 881a053..d2ec1a5 100644
--- a/hostapd/main.c
+++ b/hostapd/main.c
@@ -525,6 +525,8 @@ static int hostapd_get_global_ctrl_iface(struct hapd_interfaces *interfaces,
return -1;
pos = os_strrchr(interfaces->global_iface_path, '/');
if (pos == NULL) {
+ wpa_printf(MSG_ERROR, "No '/' in the global control interface "
+ "file");
os_free(interfaces->global_iface_path);
interfaces->global_iface_path = NULL;
return -1;
@@ -614,10 +616,12 @@ int main(int argc, char *argv[])
exit(1);
break;
case 'g':
- hostapd_get_global_ctrl_iface(&interfaces, optarg);
+ if (hostapd_get_global_ctrl_iface(&interfaces, optarg))
+ return -1;
break;
case 'G':
- hostapd_get_ctrl_iface_group(&interfaces, optarg);
+ if (hostapd_get_ctrl_iface_group(&interfaces, optarg))
+ return -1;
break;
default:
usage();