Module Name:    src
Committed By:   simonb
Date:           Mon Jan 11 07:49:05 UTC 2021

Modified Files:
        src/sys/ddb: db_proc.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 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.13 src/sys/ddb/db_proc.c:1.14
--- src/sys/ddb/db_proc.c:1.13	Fri Oct 30 06:57:08 2020
+++ src/sys/ddb/db_proc.c	Mon Jan 11 07:49:04 2021
@@ -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 @@ db_show_all_procs(db_expr_t addr, bool h
 
 	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 @@ db_show_all_procs(db_expr_t addr, bool h
 
 		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);

Reply via email to