]> granicus.if.org Git - procps-ng/commitdiff
fixed -p option (James Harlow)
authoralbert <>
Sun, 7 Sep 2003 23:28:49 +0000 (23:28 +0000)
committeralbert <>
Sun, 7 Sep 2003 23:28:49 +0000 (23:28 +0000)
NEWS
top.c

diff --git a/NEWS b/NEWS
index bbd9738c21114b90ed2c6c513ba4a83d83e7188f..c62d6e4a3a903f11458ceea2e35f0d53a8c87528 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
 procps-3.1.11 --> procps-3.1.12
 
+top: multiple -p options work again
 top: fixed 4 GB wrap-around
 ps: comes with tests
 man page: /var/run/utmp, not /etc/utmp           #206583
diff --git a/top.c b/top.c
index 3a48937b5e7bfc9c5a4d09ad50562e7ccc36b715..89de977a2d09077cb04cf998f2c212754d56f535 100644 (file)
--- a/top.c
+++ b/top.c
@@ -1771,7 +1771,7 @@ static void parse_args (char **args)
                break;
             case 'p':
                do {
-                  if (selection_type) std_err("conflicting process selection");
+                  if (selection_type && selection_type != 'p') std_err("conflicting process selection");
                   selection_type = 'p';
                   if (cp[1]) cp++;
                   else if (*args) cp = *args++;
@@ -1798,7 +1798,7 @@ static void parse_args (char **args)
             case 'u':
                do {
                   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++;
                   else if (*args) cp = *args++;
                   else std_err("-u missing name");
@@ -1811,7 +1811,7 @@ static void parse_args (char **args)
             case 'U':
                do {
                   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++;
                   else if (*args) cp = *args++;
                   else std_err("-u missing name");