summaryrefslogtreecommitdiffstats
path: root/sys-utils/ipcs.c
diff options
context:
space:
mode:
authorJens Kristian Søgaard2011-02-11 22:28:03 +0100
committerKarel Zak2011-02-21 14:26:45 +0100
commit4dad230ffb1a6a2e91bfc2a89c821b0b3e47b9ea (patch)
tree24d1f3d477dcdc3f99b00d60e4538562eab672a2 /sys-utils/ipcs.c
parentlsblk: fix readlink() usage (diff)
downloadkernel-qcow2-util-linux-4dad230ffb1a6a2e91bfc2a89c821b0b3e47b9ea.tar.gz
kernel-qcow2-util-linux-4dad230ffb1a6a2e91bfc2a89c821b0b3e47b9ea.tar.xz
kernel-qcow2-util-linux-4dad230ffb1a6a2e91bfc2a89c821b0b3e47b9ea.zip
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 <jens@mermaidconsulting.dk>
Diffstat (limited to 'sys-utils/ipcs.c')
-rw-r--r--sys-utils/ipcs.c9
1 files changed, 5 insertions, 4 deletions
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)