[PATCH 02/11] [PATCH] lscpu: fix cache output for extended parsable output

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

 



The extended parsable output prints a colon instead of comma between each
item. The case where a CPU doesn't belong to any cache was not converted.
Just fix this.

Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
---
 sys-utils/lscpu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index 3733cab..45b644b 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -922,7 +922,7 @@ print_parsable_cell(struct lscpu_desc *desc, int i, int col, int compatible)
 				}
 			}
 			if (x == ca->nsharedmaps)
-				putchar(',');
+				putchar(compatible ? ',' : ':');
 		}
 		break;
 	case COL_POLARIZATION:
-- 
1.7.5.4


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