diff options
author | Garance A Drosehn <gad@FreeBSD.org> | 2004-03-27 21:56:49 +0000 |
---|---|---|
committer | Garance A Drosehn <gad@FreeBSD.org> | 2004-03-27 21:56:49 +0000 |
commit | b34f38ae9e101a9c73e0a80153af92b744a6de2d (patch) | |
tree | c518338a108cf157d72bf0516675ac2518688c52 /bin | |
parent | 4a355d176d9f9a02fa402fe488324b4b278b4737 (diff) | |
download | src-test2-b34f38ae9e101a9c73e0a80153af92b744a6de2d.tar.gz src-test2-b34f38ae9e101a9c73e0a80153af92b744a6de2d.zip |
Notes
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ps/ps.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/bin/ps/ps.c b/bin/ps/ps.c index a5c283dd293a..a446a90d82f8 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -112,10 +112,13 @@ struct listinfo { }; static int needuser, needcomm, needenv; -#if defined(LAZY_PS) -static int forceuread=0; + +#ifdef LAZY_PS +static int forceuread = 0; +#define OPT_LAZY_f "f" #else -static int forceuread=1; +static int forceuread = 1; +#define OPT_LAZY_f /* Ie, the `-f' option is not added. */ #endif static enum sort { DEFAULT, SORTMEM, SORTCPU } sortby = DEFAULT; @@ -150,11 +153,7 @@ static char Zfmt[] = "label"; static kvm_t *kd; -#if defined(LAZY_PS) -#define PS_ARGS "AaCcefG:gHhjLlM:mN:O:o:p:rSTt:U:uvwXxZ" -#else -#define PS_ARGS "AaCceG:gHhjLlM:mN:O:o:p:rSTt:U:uvwXxZ" -#endif +#define PS_ARGS "AaCc" OPT_LAZY_f "G:gHhjLlM:mN:O:o:p:rSTt:U:uvwXxZ" int main(int argc, char *argv[]) @@ -1100,9 +1099,10 @@ kludge_oldps_options(char *s) static void usage(void) { +#define SINGLE_OPTS "[-aC" OPT_LAZY_f "HhjlmrSTuvwXxZ]" (void)fprintf(stderr, "%s\n%s\n%s\n%s\n", - "usage: ps [-aCHhjlmrSTuvwXxZ] [-G gid[,gid]] [-O|o fmt]", + "usage: ps " SINGLE_OPTS " [-G gid[,gid]] [-O|o fmt]", " [-p pid[,pid]] [-t tty[,tty]] [-U user[,user]]", " [-M core] [-N system]", " ps [-L]"); |