]> 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>
Tue, 18 Oct 2011 12:22:26 +0000 (14:22 +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 f7e854d86d49f7d1ee654a73138040ec09de71a8..8326b10815edc8a2bffd810602ad051e8b02e011 100644 (file)
@@ -830,7 +830,7 @@ print_parsable_cell(struct lscpu_desc *desc, int i, int col, int compatible)
                                }
                        }
                        if (x == ca->nsharedmaps)
-                               putchar(',');
+                               putchar(compatible ? ',' : ':');
                }
                break;
        }