]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: link: mention the need for MAC addr arg in link get_sta cmd usage menu
authorGokul Sivakumar <gokulkumar792@gmail.com>
Fri, 10 Sep 2021 14:16:16 +0000 (19:46 +0530)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 23 Sep 2021 11:34:38 +0000 (13:34 +0200)
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: https://lore.kernel.org/r/20210910141618.1594617-2-gokulkumar792@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
link.c

diff --git a/link.c b/link.c
index 1ed7f631a121a0e41b0b4ba9312c2d23cb136365..207448898603ac746c322d48867bb2d57dd4a550 100644 (file)
--- 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);