diff options
author | ru <ru@FreeBSD.org> | 2002-01-28 09:43:26 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2002-01-28 09:43:26 +0000 |
commit | 8c5c420dd348f19c005d418b7ae2b974c9c4048d (patch) | |
tree | 1077ce4e8ac45a8ef8549820a3edaa2940bbf95b /bin/ps | |
parent | a68692c6f24ace8efe344f02d4192cca660b589d (diff) | |
download | FreeBSD-src-8c5c420dd348f19c005d418b7ae2b974c9c4048d.zip FreeBSD-src-8c5c420dd348f19c005d418b7ae2b974c9c4048d.tar.gz |
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
Diffstat (limited to 'bin/ps')
-rw-r--r-- | bin/ps/ps.1 | 8 | ||||
-rw-r--r-- | bin/ps/ps.c | 20 |
2 files changed, 7 insertions, 21 deletions
diff --git a/bin/ps/ps.1 b/bin/ps/ps.1 index d8c3d54..45ec3b5 100644 --- a/bin/ps/ps.1 +++ b/bin/ps/ps.1 @@ -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 diff --git a/bin/ps/ps.c b/bin/ps/ps.c index 0dd0272..08e3d97 100644 --- a/bin/ps/ps.c +++ b/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); } |