Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/ps print TTY instead of TT, one question mark instead of...
details: https://anonhg.NetBSD.org/src/rev/24b8897f90c7
branches: trunk
changeset: 571291:24b8897f90c7
user: christos <christos%NetBSD.org@localhost>
date: Tue Nov 16 04:58:14 2004 +0000
description:
print TTY instead of TT, one question mark instead of two and always the
full tty name.
diffstat:
bin/ps/keyword.c | 8 ++++----
bin/ps/print.c | 13 +++++--------
2 files changed, 9 insertions(+), 12 deletions(-)
diffs (81 lines):
diff -r 29512b669c2f -r 24b8897f90c7 bin/ps/keyword.c
--- a/bin/ps/keyword.c Tue Nov 16 04:52:46 2004 +0000
+++ b/bin/ps/keyword.c Tue Nov 16 04:58:14 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: keyword.c,v 1.42 2004/08/23 16:31:10 nathanw Exp $ */
+/* $NetBSD: keyword.c,v 1.43 2004/11/16 04:58:14 christos Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)keyword.c 8.5 (Berkeley) 4/2/94";
#else
-__RCSID("$NetBSD: keyword.c,v 1.42 2004/08/23 16:31:10 nathanw Exp $");
+__RCSID("$NetBSD: keyword.c,v 1.43 2004/11/16 04:58:14 christos Exp $");
#endif
#endif /* not lint */
@@ -185,8 +185,8 @@
PID("tpgid", "TPGID", p_tpgid),
PVAR("tsess", "TSESS", 0, p_tsess, KPTR, PRIx64),
{"tsiz", "TSIZ", 0, tsize, POFF(p_vm_tsize), INT32},
- {"tt", "TT", LJUST, tname, POFF(p_tdev), INT32},
- {"tty", "TT", LJUST, longtname, POFF(p_tdev), INT32},
+ {"tt", "TTY", LJUST, tname, POFF(p_tdev), INT32},
+ {"tty", "TTY", LJUST, longtname, POFF(p_tdev), INT32},
{"ucomm", "UCOMM", LJUST, ucomm},
UID("uid", "UID", p_uid),
LVAR("upr", "UPR", 0, l_usrpri, UCHAR, "u"),
diff -r 29512b669c2f -r 24b8897f90c7 bin/ps/print.c
--- a/bin/ps/print.c Tue Nov 16 04:52:46 2004 +0000
+++ b/bin/ps/print.c Tue Nov 16 04:58:14 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: print.c,v 1.90 2004/04/23 02:58:27 simonb Exp $ */
+/* $NetBSD: print.c,v 1.91 2004/11/16 04:58:14 christos Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
#if 0
static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94";
#else
-__RCSID("$NetBSD: print.c,v 1.90 2004/04/23 02:58:27 simonb Exp $");
+__RCSID("$NetBSD: print.c,v 1.91 2004/11/16 04:58:14 christos Exp $");
#endif
#endif /* not lint */
@@ -687,7 +687,7 @@
dev = k->p_tdev;
if (dev == NODEV) {
if (mode == PRINTMODE)
- (void)printf("%*s", v->width, "??");
+ (void)printf("%*s", v->width, "?");
else
if (v->width < 2)
v->width = 2;
@@ -712,14 +712,11 @@
dev = k->p_tdev;
if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL) {
if (mode == PRINTMODE)
- (void)printf("%-*s", v->width, "??");
+ (void)printf("%-*s", v->width, "?");
else
if (v->width < 2)
v->width = 2;
} else {
- if (strncmp(ttname, "tty", 3) == 0 ||
- strncmp(ttname, "dty", 3) == 0)
- ttname += 3;
noctty = !(k->p_eflag & EPROC_CTTY) ? 1 : 0;
if (mode == WIDTHMODE) {
int fmtlen;
@@ -749,7 +746,7 @@
dev = k->p_tdev;
if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL) {
if (mode == PRINTMODE)
- (void)printf("%-*s", v->width, "??");
+ (void)printf("%-*s", v->width, "?");
else
if (v->width < 2)
v->width = 2;
Home |
Main Index |
Thread Index |
Old Index