From d5c7180e2b41ddc2337d723a59d7150bdf70889b Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 3 May 1999 00:17:30 +0000 Subject: [PATCH] limit session to 6 chars. from Geoff Wing and fixes his PR#7506 --- bin/ps/keyword.c | 6 +++--- bin/ps/print.c | 7 +++++-- bin/ps/ps.h | 3 ++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index 3b196344c80d..528a80e89d72 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -1,4 +1,4 @@ -/* $NetBSD: keyword.c,v 1.18 1999/04/16 13:34:32 christos Exp $ */ +/* $NetBSD: keyword.c,v 1.19 1999/05/03 00:17:30 mrg Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)keyword.c 8.5 (Berkeley) 4/2/94"; #else -__RCSID("$NetBSD: keyword.c,v 1.18 1999/04/16 13:34:32 christos Exp $"); +__RCSID("$NetBSD: keyword.c,v 1.19 1999/05/03 00:17:30 mrg Exp $"); #endif #endif /* not lint */ @@ -153,7 +153,7 @@ VAR var[] = { {"rsz", "RSZ", NULL, 0, rssize, 4}, UID("ruid", "RUID", evar, EOFF(e_pcred.p_ruid)), {"ruser", "RUSER", NULL, LJUST, runame, USERLEN}, - {"sess", "SESS", NULL, 0, evar, 6, EOFF(e_sess), KPTR, "x"}, + {"sess", "SESS", NULL, 0, evar, 6, EOFF(e_sess), KPTR24, "x"}, PID("sid", "SID", evar, EOFF(e_sid)), {"sig", "PENDING", NULL, 0, pvar, SIGWIDTH, POFF(p_siglist), SIGLIST, "s"}, diff --git a/bin/ps/print.c b/bin/ps/print.c index 223e773bfa31..6143fbb3f0d4 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.40 1999/04/16 13:34:32 christos Exp $ */ +/* $NetBSD: print.c,v 1.41 1999/05/03 00:17:30 mrg Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94"; #else -__RCSID("$NetBSD: print.c,v 1.40 1999/04/16 13:34:32 christos Exp $"); +__RCSID("$NetBSD: print.c,v 1.41 1999/05/03 00:17:30 mrg Exp $"); #endif #endif /* not lint */ @@ -724,6 +724,9 @@ printval(bp, v) case KPTR: (void)printf(ofmt, v->width, GET(u_long)); break; + case KPTR24: + (void)printf(ofmt, v->width, GET(u_long) & 0xffffff); + break; case SIGLIST: { sigset_t *s = (sigset_t *)(void *)bp; diff --git a/bin/ps/ps.h b/bin/ps/ps.h index 0c1024aa7263..b10c1a7232dc 100644 --- a/bin/ps/ps.h +++ b/bin/ps/ps.h @@ -1,4 +1,4 @@ -/* $NetBSD: ps.h,v 1.13 1999/04/16 13:34:32 christos Exp $ */ +/* $NetBSD: ps.h,v 1.14 1999/05/03 00:17:31 mrg Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,6 +37,7 @@ #define UNLIMITED 0 /* unlimited terminal width */ enum type { + CHAR, UCHAR, SHORT, USHORT, INT, UINT, LONG, ULONG, KPTR, KPTR24, CHAR, UCHAR, SHORT, USHORT, INT, UINT, LONG, ULONG, KPTR, INT32, UINT32, SIGLIST };