hostapd_cli: Allow PID file to be specified

This can help when running multiple hostapd_cli instances
per interface and need to kill them correspondingly.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
This commit is contained in:
Mohammed Shafi Shajakhan 2015-06-25 18:12:48 +05:30 committed by Jouni Malinen
parent b6387212f5
commit b8e5426dad

View file

@ -112,7 +112,7 @@ static void usage(void)
"\n"
"usage: hostapd_cli [-p<path>] [-i<ifname>] [-hvB] "
"[-a<path>] \\\n"
" [-G<ping interval>] [command..]\n"
" [-P<pid file>] [-G<ping interval>] [command..]\n"
"\n"
"Options:\n"
" -h help (show this usage text)\n"
@ -1317,7 +1317,7 @@ int main(int argc, char *argv[])
return -1;
for (;;) {
c = getopt(argc, argv, "a:BhG:i:p:v");
c = getopt(argc, argv, "a:BhG:i:p:P:v");
if (c < 0)
break;
switch (c) {
@ -1343,6 +1343,9 @@ int main(int argc, char *argv[])
case 'p':
ctrl_iface_dir = optarg;
break;
case 'P':
pid_file = optarg;
break;
default:
usage();
return -1;