]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lscpu: fix cache output for extended parsable output
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 6 Sep 2011 00:52:53 +0000 (02:52 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 9 Sep 2011 04:24:14 +0000 (06:24 +0200)
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@de.ibm.com>
sys-utils/lscpu.c

index f6641463f1c0db8fbcf0af7238dbea8db6a3f665..f231e0e0e54522b99476660b75740f6d06b54969 100644 (file)
@@ -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: