From 30d5ceeda8266a9b9d8ab58a2f128352d6aa4fe0 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Thu, 16 May 2019 21:51:47 +0100 Subject: lscpu: remove extra space from field key name The extra space was more obvious in json output. But as the expected test output displays also the standard output can be effected by this change. $ lscpu --json | jq '.lscpu | .[].field' | grep ': ' "L1d cache: " "L1i cache: " "L2 cache: " "L3 cache: " "Vulnerability L1tf: " "Vulnerability Mds: " "Vulnerability Meltdown: " "Vulnerability Spec store bypass: " "Vulnerability Spectre v1: " "Vulnerability Spectre v2: " Signed-off-by: Sami Kerola --- sys-utils/lscpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys-utils') diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c index 9a5a1aa5b..ca7f6a037 100644 --- a/sys-utils/lscpu.c +++ b/sys-utils/lscpu.c @@ -2117,7 +2117,7 @@ print_summary(struct lscpu_desc *desc, struct lscpu_modifier *mod) tmp = size_to_human_string( SIZE_SUFFIX_3LETTER | SIZE_SUFFIX_SPACE, sz); - snprintf(buf, sizeof(buf), _("%s cache: "), ca->name); + snprintf(buf, sizeof(buf), _("%s cache:"), ca->name); add_summary_s(tb, buf, tmp); free(tmp); } @@ -2135,7 +2135,7 @@ print_summary(struct lscpu_desc *desc, struct lscpu_modifier *mod) tmp = size_to_human_string( SIZE_SUFFIX_3LETTER | SIZE_SUFFIX_SPACE, ca->size); - snprintf(buf, sizeof(buf), _("%s cache: "), ca->name); + snprintf(buf, sizeof(buf), _("%s cache:"), ca->name); add_summary_s(tb, buf, tmp); free(tmp); } @@ -2154,7 +2154,7 @@ print_summary(struct lscpu_desc *desc, struct lscpu_modifier *mod) if (desc->vuls) { for (i = 0; i < desc->nvuls; i++) { - snprintf(buf, sizeof(buf), ("Vulnerability %s: "), desc->vuls[i].name); + snprintf(buf, sizeof(buf), ("Vulnerability %s:"), desc->vuls[i].name); add_summary_s(tb, buf, desc->vuls[i].text); } } -- cgit v1.2.3-55-g7522