diff options
author | Sami Kerola | 2019-05-16 22:51:47 +0200 |
---|---|---|
committer | Sami Kerola | 2019-05-16 23:04:03 +0200 |
commit | 30d5ceeda8266a9b9d8ab58a2f128352d6aa4fe0 (patch) | |
tree | 8560ee70a0f9212825f1f762674d6e94efe6f659 /sys-utils | |
parent | Merge branch 'lscpu-output-fix' of https://github.com/kerolasa/util-linux (diff) | |
download | kernel-qcow2-util-linux-30d5ceeda8266a9b9d8ab58a2f128352d6aa4fe0.tar.gz kernel-qcow2-util-linux-30d5ceeda8266a9b9d8ab58a2f128352d6aa4fe0.tar.xz kernel-qcow2-util-linux-30d5ceeda8266a9b9d8ab58a2f128352d6aa4fe0.zip |
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 <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils')
-rw-r--r-- | sys-utils/lscpu.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); } } |