lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <3fd48002172b185a34cc80cdd79de44fc31ea8fa.1609671168.git.me@pmachata.org>
Date:   Sun,  3 Jan 2021 11:57:24 +0100
From:   Petr Machata <me@...chata.org>
To:     netdev@...r.kernel.org, dsahern@...il.com,
        stephen@...workplumber.org
Cc:     Petr Machata <me@...chata.org>
Subject: [PATCH iproute2 v2 3/3] dcb: Change --Netns/-N to --netns/-n

This to keep compatible with the major tools, ip and tc. Also
document the option in the man page, which was neglected.

Fixes: 67033d1c1c8a ("Add skeleton of a new tool, dcb")
Signed-off-by: Petr Machata <me@...chata.org>
---

Notes:
    v2:
    - Add Fixes: tag.

 dcb/dcb.c      | 8 ++++----
 man/man8/dcb.8 | 7 +++++++
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/dcb/dcb.c b/dcb/dcb.c
index 0e3c87484f2a..6640deef5688 100644
--- a/dcb/dcb.c
+++ b/dcb/dcb.c
@@ -332,7 +332,7 @@ static void dcb_help(void)
 {
 	fprintf(stderr,
 		"Usage: dcb [ OPTIONS ] OBJECT { COMMAND | help }\n"
-		"       dcb [ -f | --force ] { -b | --batch } filename [ -N | --Netns ] netnsname\n"
+		"       dcb [ -f | --force ] { -b | --batch } filename [ -n | --netns ] netnsname\n"
 		"where  OBJECT := { buffer | ets | maxrate | pfc }\n"
 		"       OPTIONS := [ -V | --Version | -i | --iec | -j | --json\n"
 		"                  | -p | --pretty | -s | --statistics | -v | --verbose]\n");
@@ -379,7 +379,7 @@ int main(int argc, char **argv)
 		{ "json",		no_argument,		NULL, 'j' },
 		{ "pretty",		no_argument,		NULL, 'p' },
 		{ "statistics",		no_argument,		NULL, 's' },
-		{ "Netns",		required_argument,	NULL, 'N' },
+		{ "netns",		required_argument,	NULL, 'n' },
 		{ "help",		no_argument,		NULL, 'h' },
 		{ NULL, 0, NULL, 0 }
 	};
@@ -396,7 +396,7 @@ int main(int argc, char **argv)
 		return EXIT_FAILURE;
 	}
 
-	while ((opt = getopt_long(argc, argv, "b:fhijpsvN:V",
+	while ((opt = getopt_long(argc, argv, "b:fhijn:psvV",
 				  long_options, NULL)) >= 0) {
 
 		switch (opt) {
@@ -419,7 +419,7 @@ int main(int argc, char **argv)
 		case 's':
 			dcb->stats = true;
 			break;
-		case 'N':
+		case 'n':
 			if (netns_switch(optarg)) {
 				ret = EXIT_FAILURE;
 				goto dcb_free;
diff --git a/man/man8/dcb.8 b/man/man8/dcb.8
index 5964f25d386d..7293bb303577 100644
--- a/man/man8/dcb.8
+++ b/man/man8/dcb.8
@@ -27,6 +27,13 @@ dcb \- show / manipulate DCB (Data Center Bridging) settings
 
 .SH OPTIONS
 
+.TP
+.BR "\-n" , " \--netns " <NETNS>
+switches
+.B dcb
+to the specified network namespace
+.IR NETNS .
+
 .TP
 .BR "\-V" , " --Version"
 Print the version of the
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ