Module Name: src Committed By: martin Date: Thu Apr 18 18:06:09 UTC 2024
Modified Files: src/sys/ddb [netbsd-10]: db_proc.c Log Message: Pull up following revision(s) (requested by skrll in ticket #665): sys/ddb/db_proc.c: revision 1.16 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.14 -r1.14.18.1 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.14 src/sys/ddb/db_proc.c:1.14.18.1 --- src/sys/ddb/db_proc.c:1.14 Mon Jan 11 07:49:04 2021 +++ src/sys/ddb/db_proc.c Thu Apr 18 18:06:09 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: db_proc.c,v 1.14 2021/01/11 07:49:04 simonb Exp $ */ +/* $NetBSD: db_proc.c,v 1.14.18.1 2024/04/18 18:06:09 martin 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.14 2021/01/11 07:49:04 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_proc.c,v 1.14.18.1 2024/04/18 18:06:09 martin 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 %-12s%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 %-12s %-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);