From 4dad230ffb1a6a2e91bfc2a89c821b0b3e47b9ea Mon Sep 17 00:00:00 2001 From: Jens Kristian Søgaard Date: Fri, 11 Feb 2011 22:28:03 +0100 Subject: 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 --- sys-utils/ipcs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sys-utils/ipcs.c') diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c index 533aaeb66..afcccbcaa 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) -- cgit v1.2.3-55-g7522