[PATCH 1/2] lsblk: unset TT_FL_TREE when setting TL_FL_ASCII via -i

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

 



Reuse the same logic as when --raw is set to avoid clobbering flags.
Invoking lsblk with -ni should yield identical results as with -in.

Signed-off-by: Dave Reisner <d@xxxxxxxxxxxxxx>
---
 misc-utils/lsblk.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
index 9b00826..f44ebf6 100644
--- a/misc-utils/lsblk.c
+++ b/misc-utils/lsblk.c
@@ -946,7 +946,8 @@ int main(int argc, char *argv[])
 				return EXIT_FAILURE;
 			break;
 		case 'i':
-			tt_flags = TT_FL_ASCII;
+			tt_flags &= ~TT_FL_TREE;	/* disable the default */
+			tt_flags |= TT_FL_ASCII;	/* enable ascii */
 			break;
 		case 'r':
 			tt_flags &= ~TT_FL_TREE;	/* disable the default */
-- 
1.7.4.1

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