Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/ps Print commands within angled brackets only if they ar...
details: https://anonhg.NetBSD.org/src/rev/e00965a62b9c
branches: trunk
changeset: 514146:e00965a62b9c
user: enami <enami%NetBSD.org@localhost>
date: Fri Aug 24 01:48:22 2001 +0000
description:
Print commands within angled brackets only if they are system processes.
Print other commands, like cc, cpp and as, within parentheres.
diffstat:
bin/ps/print.c | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diffs (43 lines):
diff -r 6dc45db8bee5 -r e00965a62b9c bin/ps/print.c
--- a/bin/ps/print.c Fri Aug 24 00:54:45 2001 +0000
+++ b/bin/ps/print.c Fri Aug 24 01:48:22 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: print.c,v 1.67 2001/08/07 14:46:09 christos Exp $ */
+/* $NetBSD: print.c,v 1.68 2001/08/24 01:48:22 enami Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
#if 0
static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94";
#else
-__RCSID("$NetBSD: print.c,v 1.67 2001/08/07 14:46:09 christos Exp $");
+__RCSID("$NetBSD: print.c,v 1.68 2001/08/24 01:48:22 enami Exp $");
#endif
#endif /* not lint */
@@ -328,12 +328,19 @@
} else {
/*
* Commands that don't set an argv vector
- * (usually system processes) are printed
- * with angled brackets.
+ * are printed with angled brackets if they
+ * are system commands. Otherwise they are
+ * printed within parentheses.
*/
- fmt_putc('[', &left);
- fmt_puts(name, &left);
- fmt_putc(']', &left);
+ if (ki->p_flag & P_SYSTEM) {
+ fmt_putc('[', &left);
+ fmt_puts(name, &left);
+ fmt_putc(']', &left);
+ } else {
+ fmt_putc('(', &left);
+ fmt_puts(name, &left);
+ fmt_putc(')', &left);
+ }
}
} else {
fmt_puts(name, &left);
Home |
Main Index |
Thread Index |
Old Index