Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ddb For "ps/a" print all of p_comm instead of just the f...



details:   https://anonhg.NetBSD.org/src/rev/7e2aee09350a
branches:  trunk
changeset: 979802:7e2aee09350a
user:      simonb <simonb%NetBSD.org@localhost>
date:      Mon Jan 11 07:49:04 2021 +0000

description:
For "ps/a" print all of p_comm instead of just the first 10 chars, add a
space after PID, left justify the command name.

diffstat:

 sys/ddb/db_proc.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 3614236aff95 -r 7e2aee09350a sys/ddb/db_proc.c
--- a/sys/ddb/db_proc.c Mon Jan 11 07:17:49 2021 +0000
+++ b/sys/ddb/db_proc.c Mon Jan 11 07:49:04 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_proc.c,v 1.13 2020/10/30 06:57:08 skrll Exp $       */
+/*     $NetBSD: db_proc.c,v 1.14 2021/01/11 07:49:04 simonb 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.13 2020/10/30 06:57:08 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_proc.c,v 1.14 2021/01/11 07:49:04 simonb Exp $");
 
 #ifndef _KERNEL
 #include <stdbool.h>
@@ -149,7 +149,7 @@
 
        switch (*mode) {
        case 'a':
-               db_printf("PID  %10s %18s %18s %18s\n",
+               db_printf("PID   %-16s %18s %18s %18s\n",
                    "COMMAND", "STRUCT PROC *", "UAREA *", "VMSPACE/VM_MAP");
                break;
        case 'l':
@@ -180,7 +180,7 @@
 
                switch (*mode) {
                case 'a':
-                       db_printf("%10.10s %18lx %18lx %18lx\n",
+                       db_printf(" %-16.16s %18lx %18lx %18lx\n",
                            p.p_comm, (long)pp,
                            (long)(lp != NULL ? l.l_addr : 0),
                            (long)p.p_vmspace);



Home | Main Index | Thread Index | Old Index