diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-06 19:33:48 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-06 19:33:48 +0000 |
commit | e9ffe68bb263b3690002ccb0ff8602ed385e44dd (patch) | |
tree | e53594d43a85201066dc59dd07dff4bfc153d54c /bin/ps | |
parent | 203b51b1af44775d313d21375f491118c48293ae (diff) |
_POSIX2_LINE_MAX errbuf for kvm_openfiles()
Diffstat (limited to 'bin/ps')
-rw-r--r-- | bin/ps/ps.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/ps/ps.c b/bin/ps/ps.c index ac521f1c4e8..f152acd640b 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ps.c,v 1.4 1996/08/02 12:41:02 deraadt Exp $ */ +/* $OpenBSD: ps.c,v 1.5 1996/08/06 19:33:47 deraadt Exp $ */ /* $NetBSD: ps.c,v 1.15 1995/05/18 20:33:25 mycroft Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)ps.c 8.4 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: ps.c,v 1.4 1996/08/02 12:41:02 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ps.c,v 1.5 1996/08/06 19:33:47 deraadt Exp $"; #endif #endif /* not lint */ @@ -68,6 +68,7 @@ static char rcsid[] = "$OpenBSD: ps.c,v 1.4 1996/08/02 12:41:02 deraadt Exp $"; #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <limits.h> #include "ps.h" @@ -117,7 +118,7 @@ main(argc, argv) uid_t uid; int all, ch, flag, i, fmt, lineno, nentries; int prtheader, wflag, what, xflg; - char *nlistf, *memf, *swapf, errbuf[256]; + char *nlistf, *memf, *swapf, errbuf[_POSIX2_LINE_MAX]; if ((ioctl(STDOUT_FILENO, TIOCGWINSZ, (char *)&ws) == -1 && ioctl(STDERR_FILENO, TIOCGWINSZ, (char *)&ws) == -1 && |