Fix alignment of ddb 'ps/[lw]' output. LID matches PID and has more digits.
This commit is contained in:
parent
cec4798ac1
commit
127563b6bc
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: db_proc.c,v 1.15 2024/01/22 07:57:48 skrll Exp $ */
|
/* $NetBSD: db_proc.c,v 1.16 2024/04/15 06:48:06 skrll Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2009, 2020 The NetBSD Foundation, Inc.
|
* Copyright (c) 2009, 2020 The NetBSD Foundation, Inc.
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: db_proc.c,v 1.15 2024/01/22 07:57:48 skrll Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: db_proc.c,v 1.16 2024/04/15 06:48:06 skrll Exp $");
|
||||||
|
|
||||||
#ifndef _KERNEL
|
#ifndef _KERNEL
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
@ -153,7 +153,7 @@ db_show_all_procs(db_expr_t addr, bool haddr, db_expr_t count,
|
||||||
"COMMAND", "STRUCT PROC *", "UAREA *", "VMSPACE/VM_MAP");
|
"COMMAND", "STRUCT PROC *", "UAREA *", "VMSPACE/VM_MAP");
|
||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
db_printf("PID %4s S %3s %9s %18s %18s %-8s\n",
|
db_printf("PID %5s S %3s %9s %18s %18s %-8s\n",
|
||||||
"LID", "CPU", "FLAGS", "STRUCT LWP *", "NAME", "WAIT");
|
"LID", "CPU", "FLAGS", "STRUCT LWP *", "NAME", "WAIT");
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
|
@ -161,7 +161,7 @@ db_show_all_procs(db_expr_t addr, bool haddr, db_expr_t count,
|
||||||
"PPID", "PGRP", "UID", "FLAGS", "LWPS", "COMMAND", "WAIT");
|
"PPID", "PGRP", "UID", "FLAGS", "LWPS", "COMMAND", "WAIT");
|
||||||
break;
|
break;
|
||||||
case 'w':
|
case 'w':
|
||||||
db_printf("PID %4s %16s %8s %4s %-16s %s\n",
|
db_printf("PID %5s %16s %8s %4s %-16s %s\n",
|
||||||
"LID", "COMMAND", "EMUL", "PRI", "WAIT-MSG",
|
"LID", "COMMAND", "EMUL", "PRI", "WAIT-MSG",
|
||||||
"WAIT-CHANNEL");
|
"WAIT-CHANNEL");
|
||||||
break;
|
break;
|
||||||
|
@ -210,7 +210,7 @@ db_show_all_procs(db_expr_t addr, bool haddr, db_expr_t count,
|
||||||
} else {
|
} else {
|
||||||
wbuf[0] = '\0';
|
wbuf[0] = '\0';
|
||||||
}
|
}
|
||||||
db_printf("%c%4d %d %3d %9x %18lx %18s %-8s\n",
|
db_printf("%c%5d %d %3d %9x %18lx %18s %-8s\n",
|
||||||
(run ? '>' : ' '), l.l_lid,
|
(run ? '>' : ' '), l.l_lid,
|
||||||
l.l_stat, cpuno, l.l_flag, (long)lp,
|
l.l_stat, cpuno, l.l_flag, (long)lp,
|
||||||
db_nbuf, wbuf);
|
db_nbuf, wbuf);
|
||||||
|
@ -262,7 +262,7 @@ db_show_all_procs(db_expr_t addr, bool haddr, db_expr_t count,
|
||||||
db_nbuf[MAXCOMLEN] = '\0';
|
db_nbuf[MAXCOMLEN] = '\0';
|
||||||
|
|
||||||
db_printf(
|
db_printf(
|
||||||
"%c%4d %16s %8s %4d %-16s %-18lx\n",
|
"%c%5d %16s %8s %4d %-16s %-18lx\n",
|
||||||
(run ? '>' : ' '), l.l_lid,
|
(run ? '>' : ' '), l.l_lid,
|
||||||
p.p_comm, db_nbuf,
|
p.p_comm, db_nbuf,
|
||||||
l.l_priority, wbuf, (long)l.l_wchan);
|
l.l_priority, wbuf, (long)l.l_wchan);
|
||||||
|
|
Loading…
Reference in New Issue