diff options
author | Tom Rini | 2023-10-07 15:13:08 -0400 |
---|---|---|
committer | Tom Rini | 2023-10-16 10:24:58 -0400 |
commit | 3616218b5acea74011aea2d14aa1f6366f242849 (patch) | |
tree | ccf5fd9d448069e418752519909c8333d66ee0e0 /test | |
parent | dec5777fffcc6f9e97a20bc23fc7353b30b70ed5 (diff) |
cmd: Convert existing long help messages to the new macro
- Generally we just drop the #ifdef CONFIG_SYS_LONGHELP and endif lines
and use U_BOOT_LONGHELP to declare the same variable name as before
- In a few places, either rename the variable to follow convention or
introduce the variable as it was being done inline before.
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/cmd_ut.c | 6 | ||||
-rw-r--r-- | test/fuzz/cmd_fuzz.c | 7 |
2 files changed, 4 insertions, 9 deletions
diff --git a/test/cmd_ut.c b/test/cmd_ut.c index 0f56409e803..477d4759521 100644 --- a/test/cmd_ut.c +++ b/test/cmd_ut.c @@ -166,8 +166,7 @@ static int do_ut(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) return CMD_RET_USAGE; } -#ifdef CONFIG_SYS_LONGHELP -static char ut_help_text[] = +U_BOOT_LONGHELP(ut, "[-r] [-f] [<suite>] - run unit tests\n" " -r<runs> Number of times to run each test\n" " -f Force 'manual' tests to run as well\n" @@ -237,8 +236,7 @@ static char ut_help_text[] = !defined(CONFIG_SPL_BUILD) && !defined(API_BUILD) "\nunicode - Unicode functions" #endif - ; -#endif /* CONFIG_SYS_LONGHELP */ + ); U_BOOT_CMD( ut, CONFIG_SYS_MAXARGS, 1, do_ut, diff --git a/test/fuzz/cmd_fuzz.c b/test/fuzz/cmd_fuzz.c index e2f44f3ecb6..d0bc7b8d7b7 100644 --- a/test/fuzz/cmd_fuzz.c +++ b/test/fuzz/cmd_fuzz.c @@ -70,11 +70,8 @@ static int do_fuzz(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[] return 1; } -#ifdef CONFIG_SYS_LONGHELP -static char fuzz_help_text[] = - "[fuzz-test-name] - execute the named fuzz test\n" - ; -#endif /* CONFIG_SYS_LONGHELP */ +U_BOOT_LONGHELP(fuzz, + "[fuzz-test-name] - execute the named fuzz test\n"); U_BOOT_CMD( fuzz, CONFIG_SYS_MAXARGS, 1, do_fuzz, |