public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2] genl: modify the command output message of genl -h
@ 2022-08-12  7:21 jiangheng
  2022-08-17  2:06 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: jiangheng @ 2022-08-12  7:21 UTC (permalink / raw)
  To: netdev

From f4709a324870822066b449bab89980dba8c8af79 Mon Sep 17 00:00:00 2001
From: jinag <jinag12138@gmail.com>
Date: Thu, 14 Oct 2021 15:13:03 +0800
Subject: [PATCH] genl: modify the command output of genl -h

after the modification, the command output is the same as that of man 8 genl and more readable.
---
 genl/genl.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/genl/genl.c b/genl/genl.c
index 6557e6bc..977e9db7 100644
--- a/genl/genl.c
+++ b/genl/genl.c
@@ -99,9 +99,11 @@ static void usage(void) __attribute__((noreturn));
 static void usage(void)
 {
        fprintf(stderr,
-               "Usage: genl [ OPTIONS ] OBJECT [help] }\n"
-               "where  OBJECT := { ctrl etc }\n"
-               "       OPTIONS := { -s[tatistics] | -d[etails] | -r[aw] | -V[ersion] | -h[elp] }\n");
+               "Usage: genl [ OPTIONS ] OBJECT [help]\n"
+               "where  OBJECT := { ctrl CTRL_OPTS }\n"
+               "       OPTIONS := { -s[tatistics] | -d[etails] | -r[aw] | -V[ersion] | -h[elp] }\n"
+               "       CTRL_OPTS := { help | list | monitor | get PARMS }\n"
+               "       PARMS := { name NAME | id ID }\n");
        exit(-1);
 }

--
2.23.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH iproute2] genl: modify the command output message of genl -h
  2022-08-12  7:21 [PATCH iproute2] genl: modify the command output message of genl -h jiangheng
@ 2022-08-17  2:06 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2022-08-17  2:06 UTC (permalink / raw)
  To: jiangheng; +Cc: netdev

On Fri, 12 Aug 2022 15:21:15 +0800 (CST)
jiangheng <15720603159@163.com> wrote:

> From f4709a324870822066b449bab89980dba8c8af79 Mon Sep 17 00:00:00 2001
> From: jinag <jinag12138@gmail.com>
> Date: Thu, 14 Oct 2021 15:13:03 +0800
> Subject: [PATCH] genl: modify the command output of genl -h
> 
> after the modification, the command output is the same as that of man 8 genl and more readable.


iproute2 follows the kernel style and contribution rules.
This patch has multiple issues

$ checkpatch.pl ~/Downloads/iproute2-genl-modify-the-command-output-message-of-genl--h.patch 
WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#58: 
after the modification, the command output is the same as that of man 8 genl and more readable.

ERROR: code indent should use tabs where possible
#77: FILE: genl/genl.c:102:
+               "Usage: genl [ OPTIONS ] OBJECT [help]\n"$

WARNING: please, no spaces at the start of a line
#77: FILE: genl/genl.c:102:
+               "Usage: genl [ OPTIONS ] OBJECT [help]\n"$

ERROR: code indent should use tabs where possible
#78: FILE: genl/genl.c:103:
+               "where  OBJECT := { ctrl CTRL_OPTS }\n"$

WARNING: please, no spaces at the start of a line
#78: FILE: genl/genl.c:103:
+               "where  OBJECT := { ctrl CTRL_OPTS }\n"$

ERROR: code indent should use tabs where possible
#79: FILE: genl/genl.c:104:
+               "       OPTIONS := { -s[tatistics] | -d[etails] | -r[aw] | -V[ersion] | -h[elp] }\n"$

WARNING: please, no spaces at the start of a line
#79: FILE: genl/genl.c:104:
+               "       OPTIONS := { -s[tatistics] | -d[etails] | -r[aw] | -V[ersion] | -h[elp] }\n"$

ERROR: code indent should use tabs where possible
#80: FILE: genl/genl.c:105:
+               "       CTRL_OPTS := { help | list | monitor | get PARMS }\n"$

WARNING: please, no spaces at the start of a line
#80: FILE: genl/genl.c:105:
+               "       CTRL_OPTS := { help | list | monitor | get PARMS }\n"$

ERROR: code indent should use tabs where possible
#81: FILE: genl/genl.c:106:
+               "       PARMS := { name NAME | id ID }\n");$

WARNING: please, no spaces at the start of a line
#81: FILE: genl/genl.c:106:
+               "       PARMS := { name NAME | id ID }\n");$

ERROR: Missing Signed-off-by: line(s)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-17  2:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-12  7:21 [PATCH iproute2] genl: modify the command output message of genl -h jiangheng
2022-08-17  2:06 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox