fixed -p option (James Harlow)
This commit is contained in:
parent
6dbef339c2
commit
a44a2c74af
1
NEWS
1
NEWS
@ -1,5 +1,6 @@
|
|||||||
procps-3.1.11 --> procps-3.1.12
|
procps-3.1.11 --> procps-3.1.12
|
||||||
|
|
||||||
|
top: multiple -p options work again
|
||||||
top: fixed 4 GB wrap-around
|
top: fixed 4 GB wrap-around
|
||||||
ps: comes with tests
|
ps: comes with tests
|
||||||
man page: /var/run/utmp, not /etc/utmp #206583
|
man page: /var/run/utmp, not /etc/utmp #206583
|
||||||
|
6
top.c
6
top.c
@ -1771,7 +1771,7 @@ static void parse_args (char **args)
|
|||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
do {
|
do {
|
||||||
if (selection_type) std_err("conflicting process selection");
|
if (selection_type && selection_type != 'p') std_err("conflicting process selection");
|
||||||
selection_type = 'p';
|
selection_type = 'p';
|
||||||
if (cp[1]) cp++;
|
if (cp[1]) cp++;
|
||||||
else if (*args) cp = *args++;
|
else if (*args) cp = *args++;
|
||||||
@ -1798,7 +1798,7 @@ static void parse_args (char **args)
|
|||||||
case 'u':
|
case 'u':
|
||||||
do {
|
do {
|
||||||
const char *errmsg;
|
const char *errmsg;
|
||||||
if (selection_type) std_err("conflicting process selection");
|
if (selection_type /* && selection_type != 'u' */) std_err("conflicting process selection");
|
||||||
if (cp[1]) cp++;
|
if (cp[1]) cp++;
|
||||||
else if (*args) cp = *args++;
|
else if (*args) cp = *args++;
|
||||||
else std_err("-u missing name");
|
else std_err("-u missing name");
|
||||||
@ -1811,7 +1811,7 @@ static void parse_args (char **args)
|
|||||||
case 'U':
|
case 'U':
|
||||||
do {
|
do {
|
||||||
const char *errmsg;
|
const char *errmsg;
|
||||||
if (selection_type) std_err("conflicting process selection");
|
if (selection_type && /* selection_type != 'U' */) std_err("conflicting process selection");
|
||||||
if (cp[1]) cp++;
|
if (cp[1]) cp++;
|
||||||
else if (*args) cp = *args++;
|
else if (*args) cp = *args++;
|
||||||
else std_err("-u missing name");
|
else std_err("-u missing name");
|
||||||
|
Loading…
Reference in New Issue
Block a user