In the crash utility, the default 'ps' command (and options such as 'ps
-k')
displays kernel thread command names enclosed in square brackets
(e.g., [kworker/6:1]) to easily distinguish kernel tasks from user tasks.
However, task listing functions that rely on print_task_header() (such as
'ps -l' and 'ps -m') previously formatted all task command names enclosed
in double quotes (e.g. COMMAND: "kworker/6:1" and COMMAND: "crash").
This patch series unifies task command formatting across
print_task_header() to remove double quotes for all tasks and enclose
kernel thread command names in square brackets.
Before:
crash> ps -l 191918
[b5a7e47c0036] [ID] PID: 191918 TASK: ffff8ac62c188000 CPU: 6 COMMAND:
"kworker/6:1"
After:
crash> ps -l 191918
[b5a7e47c0036] [ID] PID: 191918 TASK: ffff8ac62c188000 CPU: 6 COMMAND:
[kworker/6:1]
Before:
crash> ps -m 196591
[0 00:00:00.033] [RU] PID: 196591 TASK: ffff8ac4bfac8000 CPU: 0 COMMAND:
"crash"
After:
crash> ps -m 196591
[0 00:00:00.033] [RU] PID: 196591 TASK: ffff8ac4bfac8000 CPU: 0 COMMAND: crash
Aaron Tomlin (2):
task: remove double quotes around command name in print_task_header()
task: enclose kernel tasks in square brackets in print_task_header()
help.c | 117 ++++++++++++++++++++++++++++-----------------------------
task.c | 7 +++-
2 files changed, 62 insertions(+), 62 deletions(-)
--
2.55.0