Currently 'help' in kiosk mode results in help text being issued for many commands the user cannot actually run. Filter the help list when kiosk mode is engaged to ensure help is fully relevant.
Filtering the list is also greatly simplifies scanning for commands that may have been accidentally classified as safe.
Signed-off-by: Daniel Thompson daniel.thompson@linaro.org --- kernel/debug/kdb/kdb_main.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index 808bf55..77b6e61 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c @@ -2401,6 +2401,9 @@ static int kdb_help(int argc, const char **argv) return 0; if (!kt->cmd_name) continue; + if (kdb_kiosk && + !(kt->cmd_flags & (KDB_SAFE | KDB_SAFE_NO_ARGS))) + continue; if (strlen(kt->cmd_usage) > 20) space = "\n "; kdb_printf("%-15.15s %-20s%s%s\n", kt->cmd_name,