lscpu: add cpu flags entry to summary output
PATCH 1/1 lscpu: add cpu flags entry to summary output
It'd be convenient to have unified cpu "Flags: " entry in the summary output.
--- sys-utils/lscpu.c | 3 +++ 1 file changed, 3 insertions(+)
sys-utils/lscpu.c +3 -0
@@ -1634,6 +1634,9 @@ print_summary(struct lscpu_desc *desc, struct lscpu_modifier *mod)snprintf (buf,sizeof (buf),_ ("NUMA node%d CPU(s):" ), desc->idx2nodenum[i]);print_cpuset (buf, desc->nodemaps[i], mod->hex); } + +if (desc->flags) +print_s (_ ("Flags:" ), desc->flags); }static void __attribute__((__noreturn__))usage (FILE *out)
Signature · 1 line
2.3.0
Quoted 2 lines · WANG Chao
sys-utils/lscpu.c | 3 +++ 1 file changed, 3 insertions(+)
Applied, thanks.
Karel Zak <[email protected]>
http://karelzak.blogspot.com
Quoted 5 lines · Karel Zak
Quoted 2 lines · WANG Chao
sys-utils/lscpu.c | 3 +++ 1 file changed, 3 insertions(+)Applied, thanks.
Hello Karel,
just a general question, from my understanding the the summary output is supposed to be human readable. I'm not sure how a 500+ character line fits into this.
At least it doesn't fit to the current layout of the summary output, but maybe that's just my impression.
Just wondering.
Karel Zak
maintainerQuoted 5 lines · Heiko Carstens
Quoted 4 lines · Karel Zak
Quoted 2 lines · WANG Chao
sys-utils/lscpu.c | 3 +++ 1 file changed, 3 insertions(+)
Quoted 7 lines
Quoted 1 line
Applied, thanks.
Hello Karel,
just a general question, from my understanding the the summary output is supposed to be human readable. I'm not sure how a 500+ character line fits into this.
It's last line printed by lscpu, so terminal wraps it and from my point of view it's still pretty human readable.
Quoted 2 lines
At least it doesn't fit to the current layout of the summary output, but maybe that's just my impression.
Any suggestion how to improve it?
I think that provide incomplete info and force people to read also /proc/cpuinfo is bad idea.
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Quoted 17 lines · Karel Zak
Quoted 5 lines · Heiko Carstens
Quoted 4 lines · Karel Zak
Quoted 2 lines · WANG Chao
sys-utils/lscpu.c | 3 +++ 1 file changed, 3 insertions(+)Quoted 7 lines
Quoted 1 line
Applied, thanks.
Hello Karel,
just a general question, from my understanding the the summary output is supposed to be human readable. I'm not sure how a 500+ character line fits into this.
It's last line printed by lscpu, so terminal wraps it and from my point of view it's still pretty human readable.
Quoted 7 lines
Quoted 2 lines
At least it doesn't fit to the current layout of the summary output, but maybe that's just my impression.
Any suggestion how to improve it?
I think that provide incomplete info and force people to read also
/proc/cpuinfois bad idea.
Ok, I was just wondering what the general "guide line" for stuff like this is.
When I applied the patch and saw the output it looked strange to me and it didn't fit to the rest of the output. However that's probably just my personal taste ;)
Anyway, no further objections.