Skip to contentSkip to conversation

cmd: cyclic: Remove duplicate command name in help text

PATCH In review Alexander Dahl 2 participants 3 messages Aug 4, 2023 – Aug 10, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cmd: cyclic: Remove duplicate command name in help text

Function 'cmd_usage()' already prints one command in usage before printing out the help text given to the U_BOOT_CMD_WITH_SUBCMDS macro.

Wrong previous output:

Usage:
cyclic cyclic demo <cycletime_ms> <delay_us> - register cyclic demo function cyclic list - list cyclic functions

---
 cmd/cyclic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/cyclic.c +1 -1
index 97324d8240..946f1d7818 100644
@@ -77,7 +77,7 @@ static int do_cyclic_list(struct cmd_tbl *cmdtp, int flag, int argc,
 }
 
 static char cyclic_help_text[] =
-	"cyclic demo <cycletime_ms> <delay_us> - register cyclic demo function\n"
+	"demo <cycletime_ms> <delay_us> - register cyclic demo function\n"
 	"cyclic list - list cyclic functions\n";
 
 U_BOOT_CMD_WITH_SUBCMDS(cyclic, "Cyclic", cyclic_help_text,

base-commit: 989892f5805dc205033c4723bc8e024472564d16

Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Alexander Dahl

Function 'cmd_usage()' already prints one command in usage before printing out the help text given to the U_BOOT_CMD_WITH_SUBCMDS macro.

Wrong previous output:

Usage:
cyclic cyclic demo <cycletime_ms> <delay_us> - register cyclic demo function cyclic list - list cyclic functions

Thanks,
Stefan

Quoted 18 lines
---
  cmd/cyclic.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
cmd/cyclic.c +1 -1
index 97324d8240..946f1d7818 100644
@@ -77,7 +77,7 @@ static int do_cyclic_list(struct cmd_tbl *cmdtp, int flag, int argc,
  }
 
  static char cyclic_help_text[] =
-	"cyclic demo <cycletime_ms> <delay_us> - register cyclic demo function\n"
+	"demo <cycletime_ms> <delay_us> - register cyclic demo function\n"
  	"cyclic list - list cyclic functions\n";
 
  U_BOOT_CMD_WITH_SUBCMDS(cyclic, "Cyclic", cyclic_help_text,
Quoted 1 line

base-commit: 989892f5805dc205033c4723bc8e024472564d16

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#2 lore raw
In reply to Alexander Dahl
Quoted 10 lines · Alexander Dahl

Function 'cmd_usage()' already prints one command in usage before printing out the help text given to the U_BOOT_CMD_WITH_SUBCMDS macro.

Wrong previous output:

Usage:
cyclic cyclic demo <cycletime_ms> <delay_us> - register cyclic demo function cyclic list - list cyclic functions

Applied to u-boot-watchdog/master

Thanks,
Stefan

Quoted 18 lines
---
  cmd/cyclic.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
cmd/cyclic.c +1 -1
index 97324d8240..946f1d7818 100644
@@ -77,7 +77,7 @@ static int do_cyclic_list(struct cmd_tbl *cmdtp, int flag, int argc,
  }
 
  static char cyclic_help_text[] =
-	"cyclic demo <cycletime_ms> <delay_us> - register cyclic demo function\n"
+	"demo <cycletime_ms> <delay_us> - register cyclic demo function\n"
  	"cyclic list - list cyclic functions\n";
 
  U_BOOT_CMD_WITH_SUBCMDS(cyclic, "Cyclic", cyclic_help_text,
Quoted 1 line

base-commit: 989892f5805dc205033c4723bc8e024472564d16

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]