GC the -W option. kvm(3) doesn't read swap for almost 10 years.
PR: docs/34134 Reviewed by: bde, peter MFC after: 1 month
This commit is contained in:
parent
ce84ffa046
commit
1afca48ebe
@ -51,7 +51,6 @@
|
||||
.Op , Ns Ar username Ns No ...
|
||||
.Xc
|
||||
.Oc
|
||||
.Op Fl W Ar swap
|
||||
.Nm
|
||||
.Op Fl L
|
||||
.Sh DESCRIPTION
|
||||
@ -169,9 +168,6 @@ The
|
||||
option implies the
|
||||
.Fl m
|
||||
option.
|
||||
.It Fl W
|
||||
Extract swap information from the specified file instead of
|
||||
using libkvm.
|
||||
.It Fl w
|
||||
Use 132 columns to display information, instead of the default which
|
||||
is your window size.
|
||||
@ -500,10 +496,6 @@ exit or stop status (valid only for stopped or zombie process)
|
||||
.El
|
||||
.Sh FILES
|
||||
.Bl -tag -width /var/db/kvm_kernel.db -compact
|
||||
.It Pa /dev
|
||||
special files and device names
|
||||
.It Pa /dev/drum
|
||||
default swap device
|
||||
.It Pa /dev/kmem
|
||||
default kernel memory
|
||||
.It Pa /dev/lomac
|
||||
|
20
bin/ps/ps.c
20
bin/ps/ps.c
@ -128,7 +128,7 @@ main(argc, argv)
|
||||
uid_t *uids;
|
||||
int all, ch, flag, i, fmt, lineno, nentries, dropgid;
|
||||
int prtheader, wflag, what, xflg, uid, nuids;
|
||||
char *nlistf, *memf, *swapf, errbuf[_POSIX2_LINE_MAX];
|
||||
char *nlistf, *memf, errbuf[_POSIX2_LINE_MAX];
|
||||
|
||||
(void) setlocale(LC_ALL, "");
|
||||
|
||||
@ -149,12 +149,12 @@ main(argc, argv)
|
||||
uids = NULL;
|
||||
ttydev = NODEV;
|
||||
dropgid = 0;
|
||||
memf = nlistf = swapf = _PATH_DEVNULL;
|
||||
memf = nlistf = _PATH_DEVNULL;
|
||||
while ((ch = getopt(argc, argv,
|
||||
#if defined(LAZY_PS)
|
||||
"aCcefghjLlM:mN:O:o:p:rSTt:U:uvW:wxZ")) != -1)
|
||||
"aCcefghjLlM:mN:O:o:p:rSTt:U:uv:wxZ")) != -1)
|
||||
#else
|
||||
"aCceghjLlM:mN:O:o:p:rSTt:U:uvW:wxZ")) != -1)
|
||||
"aCceghjLlM:mN:O:o:p:rSTt:U:uv:wxZ")) != -1)
|
||||
#endif
|
||||
switch((char)ch) {
|
||||
case 'a':
|
||||
@ -263,10 +263,6 @@ main(argc, argv)
|
||||
fmt = 1;
|
||||
vfmt[0] = '\0';
|
||||
break;
|
||||
case 'W':
|
||||
swapf = optarg;
|
||||
dropgid = 1;
|
||||
break;
|
||||
case 'w':
|
||||
if (wflag)
|
||||
termwidth = UNLIMITED;
|
||||
@ -294,8 +290,6 @@ main(argc, argv)
|
||||
nlistf = *argv;
|
||||
if (*++argv) {
|
||||
memf = *argv;
|
||||
if (*++argv)
|
||||
swapf = *argv;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -308,7 +302,7 @@ main(argc, argv)
|
||||
setuid(getuid());
|
||||
}
|
||||
|
||||
kd = kvm_openfiles(nlistf, memf, swapf, O_RDONLY, errbuf);
|
||||
kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, errbuf);
|
||||
if (kd == 0)
|
||||
errx(1, "%s", errbuf);
|
||||
|
||||
@ -611,7 +605,7 @@ kludge_oldps_options(s)
|
||||
* option string, the remainder of the string is the argument to
|
||||
* that flag; do not modify that argument.
|
||||
*/
|
||||
if (strcspn(s, "MNOoUW") == len && *cp == 't' && *s != '-')
|
||||
if (strcspn(s, "MNOoU") == len && *cp == 't' && *s != '-')
|
||||
*cp = 'T';
|
||||
else {
|
||||
/*
|
||||
@ -643,7 +637,7 @@ usage()
|
||||
|
||||
(void)fprintf(stderr, "%s\n%s\n%s\n",
|
||||
"usage: ps [-aChjlmrSTuvwx] [-O|o fmt] [-p pid] [-t tty] [-U user]",
|
||||
" [-M core] [-N system] [-W swap]",
|
||||
" [-M core] [-N system]",
|
||||
" ps [-L]");
|
||||
exit(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user