[PATCH] sys-utils/ipcs Really show all resources when -a and -i are combined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxxxxxxxxxxxx>


--- util-linux-2.19/sys-utils/ipcs.c	2011-02-11 22:10:51.017150900 +0100
+++ util-linux-2.19-changed/sys-utils/ipcs.c 2011-02-11 22:10:24.821018344 +0100
@@ -197,13 +197,13 @@
 	}

 	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)


--
Jens Kristian Søgaard, Mermaid Consulting ApS,
jens@xxxxxxxxxxxxxxxxxxxx,
http://www.mermaidconsulting.com/
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux