Module Name: src Committed By: skrll Date: Mon Apr 15 06:48:07 UTC 2024
Modified Files: src/sys/ddb: db_proc.c Log Message: Fix alignment of ddb 'ps/[lw]' output. LID matches PID and has more digits. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/ddb/db_proc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/ddb/db_proc.c diff -u src/sys/ddb/db_proc.c:1.15 src/sys/ddb/db_proc.c:1.16 --- src/sys/ddb/db_proc.c:1.15 Mon Jan 22 07:57:48 2024 +++ src/sys/ddb/db_proc.c Mon Apr 15 06:48:06 2024 @@ -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. @@ -61,7 +61,7 @@ */ #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 #include <stdbool.h> @@ -153,7 +153,7 @@ db_show_all_procs(db_expr_t addr, bool h "COMMAND", "STRUCT PROC *", "UAREA *", "VMSPACE/VM_MAP"); break; 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"); break; case 'n': @@ -161,7 +161,7 @@ db_show_all_procs(db_expr_t addr, bool h "PPID", "PGRP", "UID", "FLAGS", "LWPS", "COMMAND", "WAIT"); break; 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", "WAIT-CHANNEL"); break; @@ -210,7 +210,7 @@ db_show_all_procs(db_expr_t addr, bool h } else { 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, l.l_stat, cpuno, l.l_flag, (long)lp, db_nbuf, wbuf); @@ -262,7 +262,7 @@ db_show_all_procs(db_expr_t addr, bool h db_nbuf[MAXCOMLEN] = '\0'; db_printf( - "%c%4d %16s %8s %4d %-16s %-18lx\n", + "%c%5d %16s %8s %4d %-16s %-18lx\n", (run ? '>' : ' '), l.l_lid, p.p_comm, db_nbuf, l.l_priority, wbuf, (long)l.l_wchan);