From: Mohammed Shafi Shajakhan Date: Thu, 25 Jun 2015 12:42:48 +0000 (+0530) Subject: hostapd_cli: Allow PID file to be specified X-Git-Tag: hostap_2_5~370 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8e5426dadd43534fbd7e73bd3c2a5c743d0eccf;p=thirdparty%2Fhostap.git 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 --- diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c index 42f8bd487..320d56a51 100644 --- a/hostapd/hostapd_cli.c +++ b/hostapd/hostapd_cli.c @@ -112,7 +112,7 @@ static void usage(void) "\n" "usage: hostapd_cli [-p] [-i] [-hvB] " "[-a] \\\n" - " [-G] [command..]\n" + " [-P] [-G] [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;