mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Save argv[0] and use it in usage message.
This commit is contained in:
parent
c7ae8b4fa8
commit
478521fa8d
1 changed files with 5 additions and 1 deletions
|
|
@ -56,6 +56,8 @@
|
|||
|
||||
#include "../../../sys/net80211/ieee80211_ioctl.h"
|
||||
|
||||
const char *progname;
|
||||
|
||||
static void
|
||||
printstats(FILE *fd, const struct ieee80211_stats *stats)
|
||||
{
|
||||
|
|
@ -229,6 +231,8 @@ main(int argc, char *argv[])
|
|||
struct ieee80211req ireq;
|
||||
int allnodes = 0;
|
||||
|
||||
progname = argv[0];
|
||||
|
||||
s = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
if (s < 0)
|
||||
err(1, "socket");
|
||||
|
|
@ -242,7 +246,7 @@ main(int argc, char *argv[])
|
|||
strncpy(ifr.ifr_name, optarg, sizeof (ifr.ifr_name));
|
||||
break;
|
||||
default:
|
||||
errx(1, "usage: %s [-a] [-i device] [mac...]\n");
|
||||
errx(1, "usage: %s [-a] [-i device] [mac...]\n", progname);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue