diff options
| author | Ruslan Ermilov <ru@FreeBSD.org> | 2002-02-01 14:09:30 +0000 |
|---|---|---|
| committer | Ruslan Ermilov <ru@FreeBSD.org> | 2002-02-01 14:09:30 +0000 |
| commit | 9b753ab60193643f50b5126ac48b19721a2f19b2 (patch) | |
| tree | eb303315014c23a7545cd778f5e442e70df3d05f /bin/ps | |
| parent | dbbab45b86d45ff6c4c8c6077eeefdfb41f23928 (diff) | |
Notes
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 e4d7e52e5683..1805fc06c93a 100644 --- a/bin/ps/ps.1 +++ b/bin/ps/ps.1 @@ -48,7 +48,6 @@ .Op Fl p Ar pid .Op Fl t Ar tty .Op Fl U Ar username -.Op Fl W Ar swap .Nm .Op Fl L .Sh DESCRIPTION @@ -166,9 +165,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. @@ -483,10 +479,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 /var/run/dev.db diff --git a/bin/ps/ps.c b/bin/ps/ps.c index 152ff33a4c4a..9ce24357d387 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -126,7 +126,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, ""); @@ -147,12 +147,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:wx")) != -1) + "aCcefghjLlM:mN:O:o:p:rSTt:U:uvwx")) != -1) #else - "aCceghjLlM:mN:O:o:p:rSTt:U:uvW:wx")) != -1) + "aCceghjLlM:mN:O:o:p:rSTt:U:uvwx")) != -1) #endif switch((char)ch) { case 'a': @@ -261,10 +261,6 @@ main(argc, argv) fmt = 1; vfmt[0] = '\0'; break; - case 'W': - swapf = optarg; - dropgid = 1; - break; case 'w': if (wflag) termwidth = UNLIMITED; @@ -288,8 +284,6 @@ main(argc, argv) nlistf = *argv; if (*++argv) { memf = *argv; - if (*++argv) - swapf = *argv; } } #endif @@ -302,7 +296,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); } |
