mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 22:21:21 +00:00
kdb_main: fix help print
The help command was chopping all the usage instructions such that they were not readable. Example: bta [D|R|S|T|C|Z|E|U|I| Backtrace all processes matching state flag per_cpu <sym> [<bytes>] [<c Display per_cpu variables Where as it should look like: bta [D|R|S|T|C|Z|E|U|I|M|A] Backtrace all processes matching state flag per_cpu <sym> [<bytes>] [<cpu>] Display per_cpu variables All that is needed is to check the how long the cmd_usage is and jump to the next line when appropriate. Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
This commit is contained in:
parent
4eb7a66d94
commit
074604af21
1 changed files with 7 additions and 3 deletions
|
@ -2442,11 +2442,15 @@ static int kdb_help(int argc, const char **argv)
|
||||||
kdb_printf("-----------------------------"
|
kdb_printf("-----------------------------"
|
||||||
"-----------------------------\n");
|
"-----------------------------\n");
|
||||||
for_each_kdbcmd(kt, i) {
|
for_each_kdbcmd(kt, i) {
|
||||||
if (kt->cmd_name)
|
char *space = "";
|
||||||
kdb_printf("%-15.15s %-20.20s %s\n", kt->cmd_name,
|
|
||||||
kt->cmd_usage, kt->cmd_help);
|
|
||||||
if (KDB_FLAG(CMD_INTERRUPT))
|
if (KDB_FLAG(CMD_INTERRUPT))
|
||||||
return 0;
|
return 0;
|
||||||
|
if (!kt->cmd_name)
|
||||||
|
continue;
|
||||||
|
if (strlen(kt->cmd_usage) > 20)
|
||||||
|
space = "\n ";
|
||||||
|
kdb_printf("%-15.15s %-20s%s%s\n", kt->cmd_name,
|
||||||
|
kt->cmd_usage, space, kt->cmd_help);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue