From: Gokul Sivakumar <gokulkumar792@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Gokul Sivakumar <gokulkumar792@gmail.com>,
linux-wireless@vger.kernel.org
Subject: [PATCH iw 2/4] iw: link: mention the need for MAC addr arg in link get_sta cmd usage menu
Date: Fri, 10 Sep 2021 19:46:16 +0530 [thread overview]
Message-ID: <20210910141618.1594617-2-gokulkumar792@gmail.com> (raw)
In-Reply-To: <20210910141618.1594617-1-gokulkumar792@gmail.com>
The usage menu shown when running the hidden "link get_sta" command is not
mentioning the need for the MAC address argument. Without this, the cmd is
always failing with the output shown below.
$ ./iw dev wlan0 link get_sta
Usage: ./iw [options] dev <devname> link get_sta
...
To avoid this, let the user know about the mandatory "MAC address" argument
like below.
$ ./iw dev wlan0 link get_sta
Usage: ./iw [options] dev <devname> link get_sta <mac-addr>
...
Signed-off-by: Gokul Sivakumar <gokulkumar792@gmail.com>
---
link.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/link.c b/link.c
index 1ed7f63..2074488 100644
--- a/link.c
+++ b/link.c
@@ -273,7 +273,7 @@ static int handle_link(struct nl80211_state *state,
}
TOPLEVEL(link, NULL, 0, 0, CIB_NETDEV, handle_link,
"Print information about the current link, if any.");
-HIDDEN(link, get_sta, "", NL80211_CMD_GET_STATION, 0,
+HIDDEN(link, get_sta, "<mac-addr>", NL80211_CMD_GET_STATION, 0,
CIB_NETDEV, handle_link_sta);
HIDDEN(link, get_bss, NULL, NL80211_CMD_GET_SCAN, NLM_F_DUMP,
CIB_NETDEV, handle_scan_for_link);
--
2.25.1
next prev parent reply other threads:[~2021-09-10 14:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-10 14:16 [PATCH iw 1/4] iw: nl80211: add NLA_F_NESTED to nla_nest_start() with older libnl versions Gokul Sivakumar
2021-09-10 14:16 ` Gokul Sivakumar [this message]
2021-09-10 14:16 ` [PATCH iw 3/4] iw: event: add the missing time display format in the "iw event" help menu Gokul Sivakumar
2021-09-10 14:16 ` [PATCH iw 4/4] iw: mesh: add comments in the mesh confguration parameter printing sections Gokul Sivakumar
2021-09-23 11:36 ` [PATCH iw 1/4] iw: nl80211: add NLA_F_NESTED to nla_nest_start() with older libnl versions Johannes Berg
2021-09-23 15:53 ` Gokul Sivakumar
2021-09-23 15:56 ` Johannes Berg
2021-09-23 16:23 ` Gokul Sivakumar
2021-09-23 16:25 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210910141618.1594617-2-gokulkumar792@gmail.com \
--to=gokulkumar792@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).