Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Sep 2025 03:32:19 GMT
From:      Li-Wen Hsu <lwhsu@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 89eee8ee2ce5 - main - wlanstat(8): Rename from wlanstats(8) to keep consistency
Message-ID:  <202509300332.58U3WJkx093281@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by lwhsu:

URL: https://cgit.FreeBSD.org/src/commit/?id=89eee8ee2ce57b7884defb8f9af016cd28ef1562

commit 89eee8ee2ce57b7884defb8f9af016cd28ef1562
Author:     Li-Wen Hsu <lwhsu@FreeBSD.org>
AuthorDate: 2025-09-30 03:30:08 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2025-09-30 03:30:08 +0000

    wlanstat(8): Rename from wlanstats(8) to keep consistency
    
    All the status and statistics utilties in base are ending with "stat",
    the only exception is mailstats(8) but that's from sendmail.
    
    Reviewed by:    imp, adrian
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D52724
---
 ObsoleteFiles.inc                                       |  4 ++++
 usr.sbin/Makefile                                       |  2 +-
 usr.sbin/{wlanstats => wlanstat}/Makefile               |  6 +++---
 usr.sbin/{wlanstats => wlanstat}/main.c                 |  8 ++++----
 usr.sbin/{wlanstats/wlanstats.8 => wlanstat/wlanstat.8} |  4 ++--
 usr.sbin/{wlanstats/wlanstats.c => wlanstat/wlanstat.c} | 10 +++++-----
 usr.sbin/{wlanstats/wlanstats.h => wlanstat/wlanstat.h} |  8 ++++----
 7 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index 06aacea24c69..55202d1c100c 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -51,6 +51,10 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20250930: Rename wlanstats to wlanstat
+OLD_FILES+=usr/sbin/wlanstats
+OLD_FILES+=usr/share/man/man8/wlanstats.8.gz
+
 # 20250929: Remove ftpd(8)
 OLD_FILES+=etc/rc.d/ftpd
 OLD_FILES+=usr/libexec/ftpd
diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile
index 90b360ac55e6..e660c1e59157 100644
--- a/usr.sbin/Makefile
+++ b/usr.sbin/Makefile
@@ -210,7 +210,7 @@ SUBDIR.${MK_UTMPX}+=	ac
 SUBDIR.${MK_UTMPX}+=	lastlogin
 SUBDIR.${MK_UTMPX}+=	utx
 SUBDIR.${MK_WIRELESS}+=	wlandebug
-SUBDIR.${MK_WIRELESS}+=	wlanstats
+SUBDIR.${MK_WIRELESS}+=	wlanstat
 SUBDIR.${MK_WIRELESS}+=	wpa
 
 SUBDIR.${MK_TESTS}+=	tests
diff --git a/usr.sbin/wlanstats/Makefile b/usr.sbin/wlanstat/Makefile
similarity index 78%
rename from usr.sbin/wlanstats/Makefile
rename to usr.sbin/wlanstat/Makefile
index 574a9c27137f..ec1fc3206267 100644
--- a/usr.sbin/wlanstats/Makefile
+++ b/usr.sbin/wlanstat/Makefile
@@ -1,13 +1,13 @@
 .include <bsd.compiler.mk>
 
-PROG=	wlanstats
-MAN=	wlanstats.8
+PROG=	wlanstat
+MAN=	wlanstat.8
 
 CFLAGS=	-I${SRCTOP}/lib/libbsdstat
 LIBADD=	bsdstat
 
 SRCS=	main.c \
-	wlanstats.c
+	wlanstat.c
 
 CFLAGS.clang+= -fbracket-depth=512 -Wno-cast-align
 
diff --git a/usr.sbin/wlanstats/main.c b/usr.sbin/wlanstat/main.c
similarity index 97%
rename from usr.sbin/wlanstats/main.c
rename to usr.sbin/wlanstat/main.c
index 85d10ad9012a..fba0b01a07d0 100644
--- a/usr.sbin/wlanstats/main.c
+++ b/usr.sbin/wlanstat/main.c
@@ -28,7 +28,7 @@
  */
 
 /*
- * wlanstats [-i interface]
+ * wlanstat [-i interface]
  * (default interface is wlan0).
  */
 
@@ -45,7 +45,7 @@
 #include <strings.h>
 #include <unistd.h>
 
-#include "wlanstats.h"
+#include "wlanstat.h"
 
 static struct {
 	const char *tag;
@@ -158,7 +158,7 @@ static void
 usage(void)
 {
 
-	printf("wlanstats: [-h] [-i ifname] [-l] [-m station_MAC_address] [-o fmt] [interval]\n");
+	printf("wlanstat: [-h] [-i ifname] [-l] [-m station_MAC_address] [-o fmt] [interval]\n");
 }
 
 int
@@ -176,7 +176,7 @@ main(int argc, char *argv[])
 	ifname = getenv("WLAN");
 	if (ifname == NULL)
 		ifname = "wlan0";
-	wf = wlanstats_new(ifname, getfmt("default"));
+	wf = wlanstat_new(ifname, getfmt("default"));
 #if 0
 	while ((c = getopt(argc, argv, "ahi:lm:o:")) != -1) {
 #else
diff --git a/usr.sbin/wlanstats/wlanstats.8 b/usr.sbin/wlanstat/wlanstat.8
similarity index 97%
rename from usr.sbin/wlanstats/wlanstats.8
rename to usr.sbin/wlanstat/wlanstat.8
index a8127726dd61..6e3df1ef3e5e 100644
--- a/usr.sbin/wlanstats/wlanstats.8
+++ b/usr.sbin/wlanstat/wlanstat.8
@@ -7,10 +7,10 @@
 .\" SPDX-License-Identifier: BSD-2-Clause
 .\"
 .Dd March 14, 2025
-.Dt WLANSTATS 8
+.Dt WLANSTAT 8
 .Os
 .Sh NAME
-.Nm wlanstats
+.Nm wlanstat
 .Nd query 802.11 wireless network statistics
 .Sh SYNOPSIS
 .Nm
diff --git a/usr.sbin/wlanstats/wlanstats.c b/usr.sbin/wlanstat/wlanstat.c
similarity index 99%
rename from usr.sbin/wlanstats/wlanstats.c
rename to usr.sbin/wlanstat/wlanstat.c
index 83f5010341a9..468c4848004d 100644
--- a/usr.sbin/wlanstats/wlanstats.c
+++ b/usr.sbin/wlanstat/wlanstat.c
@@ -52,7 +52,7 @@
 
 #include "../../sys/net80211/ieee80211_ioctl.h"
 
-#include "wlanstats.h"
+#include "wlanstat.h"
 
 #ifndef IEEE80211_ADDR_COPY
 #define	IEEE80211_ADDR_COPY(dst, src)	memcpy(dst, src, IEEE80211_ADDR_LEN)
@@ -61,7 +61,7 @@
 
 #define	AFTER(prev)	((prev)+1)
 
-static const struct fmt wlanstats[] = {
+static const struct fmt wlanstat[] = {
 #define	S_RX_BADVERSION		0
 	{ 5,  "rx_badversion",	"bvers",	"rx frame with bad version" },
 #define	S_RX_TOOSHORT		AFTER(S_RX_BADVERSION)
@@ -1032,14 +1032,14 @@ wlan_get_totstat(struct bsdstat *sf, int s, char b[], size_t bs)
 BSDSTAT_DEFINE_BOUNCE(wlanstatfoo)
 
 struct wlanstatfoo *
-wlanstats_new(const char *ifname, const char *fmtstring)
+wlanstat_new(const char *ifname, const char *fmtstring)
 {
 	struct wlanstatfoo_p *wf;
 
 	wf = calloc(1, sizeof(struct wlanstatfoo_p));
 	if (wf != NULL) {
-		bsdstat_init(&wf->base.base, "wlanstats", wlanstats,
-		    nitems(wlanstats));
+		bsdstat_init(&wf->base.base, "wlanstat", wlanstat,
+		    nitems(wlanstat));
 		/* override base methods */
 		wf->base.base.collect_cur = wlan_collect_cur;
 		wf->base.base.collect_tot = wlan_collect_tot;
diff --git a/usr.sbin/wlanstats/wlanstats.h b/usr.sbin/wlanstat/wlanstat.h
similarity index 93%
rename from usr.sbin/wlanstats/wlanstats.h
rename to usr.sbin/wlanstat/wlanstat.h
index 8ab3c0558fd6..ed0150e11809 100644
--- a/usr.sbin/wlanstats/wlanstats.h
+++ b/usr.sbin/wlanstat/wlanstat.h
@@ -27,8 +27,8 @@
  * THE POSSIBILITY OF SUCH DAMAGES.
  */
 
-#ifndef _WLANSTATS_H_
-#define	_WLANSTATS_H_
+#ifndef _WLANSTAT_H_
+#define	_WLANSTAT_H_
 
 #include "bsdstat.h"
 
@@ -50,5 +50,5 @@ struct wlanstatfoo {
 	void (*setstamac)(struct wlanstatfoo *, const uint8_t mac[]);
 };
 
-struct wlanstatfoo *wlanstats_new(const char *ifname, const char *fmtstring);
-#endif /* _WLANSTATS_H_ */
+struct wlanstatfoo *wlanstat_new(const char *ifname, const char *fmtstring);
+#endif /* _WLANSTAT_H_ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202509300332.58U3WJkx093281>