From 4dad230ffb1a6a2e91bfc2a89c821b0b3e47b9ea Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jens=20Kristian=20S=C3=B8gaard?= Date: Fri, 11 Feb 2011 22:28:03 +0100 Subject: [PATCH] ipcs: really show all resources when -a and -i are combined MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- sys-utils/ipcs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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) -- 2.47.3