From: Karel Zak Date: Thu, 11 Apr 2019 11:53:03 +0000 (+0200) Subject: lscpu: wrap default output long lines on terminal X-Git-Tag: v2.34-rc1~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8910af5a67db98bea9111c648ab224625c46784;p=thirdparty%2Futil-linux.git lscpu: wrap default output long lines on terminal Signed-off-by: Karel Zak --- diff --git a/sys-utils/lscpu.1 b/sys-utils/lscpu.1 index 3060bfc17d..e82fa43203 100644 --- a/sys-utils/lscpu.1 +++ b/sys-utils/lscpu.1 @@ -29,7 +29,10 @@ column labels are not case sensitive. .sp Not all columns are supported on all architectures. If an unsupported column is specified, \fBlscpu\fP prints the column but does not provide any data for it. - +.sp +The default output formatting on terminal maybe optimized for better +readability. The output for non-terminals (e.g. pipes) is never affected by +this optimization and it is always in "Field: data\\n" format. .SS COLUMNS Note that topology elements (core, socket, etc.) use a sequential unique ID starting from zero, but CPU logical numbers follow the kernel where there is diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c index c967837ff5..774a27b3a0 100644 --- a/sys-utils/lscpu.c +++ b/sys-utils/lscpu.c @@ -1954,7 +1954,7 @@ print_summary(struct lscpu_desc *desc, struct lscpu_modifier *mod) } if (scols_table_new_column(tb, "field", 0, 0) == NULL || - scols_table_new_column(tb, "data", 0, SCOLS_FL_NOEXTREMES) == NULL) + scols_table_new_column(tb, "data", 0, SCOLS_FL_NOEXTREMES | SCOLS_FL_WRAP) == NULL) err(EXIT_FAILURE, _("failed to initialize output column")); add_summary_s(tb, _("Architecture:"), desc->arch);