]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
ipcs: really show all resources when -a and -i are combined
authorJens Kristian Søgaard <jens@mermaidconsulting.dk>
Fri, 11 Feb 2011 21:28:03 +0000 (22:28 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 21 Feb 2011 13:26:45 +0000 (14:26 +0100)
When you have more than one resource with the same id (but differing
types) combining -a and -i does not show all resources. This patch
corrects that.

Signed-off-by: Jens Kristian Søgaard <jens@mermaidconsulting.dk>
sys-utils/ipcs.c

index 533aaeb6681d60b0b58bbf66536734c02fd48a1f..afcccbcaa45e62aab4dc0c67da143f67c3a3305e 100644 (file)
@@ -196,14 +196,15 @@ main (int argc, char **argv) {
                }
        }
 
+
        if  (print) {
-               if (shm)
+               if (shm)
                        print_shm (id);
-               else if (sem)
+               if (sem)
                        print_sem (id);
-               else if (msg)
+               if (msg)
                        print_msg (id);
-               else
+               if (!msg && !sem && !msg )
                        usage (EXIT_FAILURE);
        } else {
                if ( !shm && !msg && !sem)