From: Jens Kristian Søgaard Date: Fri, 11 Feb 2011 21:28:03 +0000 (+0100) Subject: ipcs: really show all resources when -a and -i are combined X-Git-Tag: v2.20-rc1~542 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4dad230ffb1a6a2e91bfc2a89c821b0b3e47b9ea;p=thirdparty%2Futil-linux.git ipcs: really show all resources when -a and -i are combined 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 --- diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c index 533aaeb668..afcccbcaa4 100644 --- a/sys-utils/ipcs.c +++ b/sys-utils/ipcs.c @@ -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)