Util-Linux package development
 help / color / mirror / Atom feed
* [PATCH] lscpu: add cpu flags entry to summary output
@ 2015-05-13  3:15 WANG Chao
  2015-05-13  9:32 ` Karel Zak
  0 siblings, 1 reply; 5+ messages in thread
From: WANG Chao @ 2015-05-13  3:15 UTC (permalink / raw)
  To: util-linux

It'd be convenient to have unified cpu "Flags: " entry in the summary
output.

Signed-off-by: WANG Chao <wcwxyz@gmail.com>
---
 sys-utils/lscpu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index fd94d1a..b36d1da 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -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)
-- 
2.3.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] lscpu: add cpu flags entry to summary output
  2015-05-13  3:15 [PATCH] lscpu: add cpu flags entry to summary output WANG Chao
@ 2015-05-13  9:32 ` Karel Zak
  2015-05-15  7:37   ` Heiko Carstens
  0 siblings, 1 reply; 5+ messages in thread
From: Karel Zak @ 2015-05-13  9:32 UTC (permalink / raw)
  To: WANG Chao; +Cc: util-linux

On Wed, May 13, 2015 at 11:15:05AM +0800, WANG Chao wrote:
>  sys-utils/lscpu.c | 3 +++
>  1 file changed, 3 insertions(+)

 Applied, thanks.

 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] lscpu: add cpu flags entry to summary output
  2015-05-13  9:32 ` Karel Zak
@ 2015-05-15  7:37   ` Heiko Carstens
  2015-05-15 10:54     ` Karel Zak
  0 siblings, 1 reply; 5+ messages in thread
From: Heiko Carstens @ 2015-05-15  7:37 UTC (permalink / raw)
  To: Karel Zak; +Cc: WANG Chao, util-linux

On Wed, May 13, 2015 at 11:32:07AM +0200, Karel Zak wrote:
> On Wed, May 13, 2015 at 11:15:05AM +0800, WANG Chao wrote:
> >  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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] lscpu: add cpu flags entry to summary output
  2015-05-15  7:37   ` Heiko Carstens
@ 2015-05-15 10:54     ` Karel Zak
  2015-05-15 12:40       ` Heiko Carstens
  0 siblings, 1 reply; 5+ messages in thread
From: Karel Zak @ 2015-05-15 10:54 UTC (permalink / raw)
  To: Heiko Carstens; +Cc: WANG Chao, util-linux

On Fri, May 15, 2015 at 09:37:48AM +0200, Heiko Carstens wrote:
> On Wed, May 13, 2015 at 11:32:07AM +0200, Karel Zak wrote:
> > On Wed, May 13, 2015 at 11:15:05AM +0800, WANG Chao wrote:
> > >  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.

It's last line printed by lscpu, so terminal wraps it and from my
point of view it's still pretty human readable.

> 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

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] lscpu: add cpu flags entry to summary output
  2015-05-15 10:54     ` Karel Zak
@ 2015-05-15 12:40       ` Heiko Carstens
  0 siblings, 0 replies; 5+ messages in thread
From: Heiko Carstens @ 2015-05-15 12:40 UTC (permalink / raw)
  To: Karel Zak; +Cc: WANG Chao, util-linux

On Fri, May 15, 2015 at 12:54:02PM +0200, Karel Zak wrote:
> On Fri, May 15, 2015 at 09:37:48AM +0200, Heiko Carstens wrote:
> > On Wed, May 13, 2015 at 11:32:07AM +0200, Karel Zak wrote:
> > > On Wed, May 13, 2015 at 11:15:05AM +0800, WANG Chao wrote:
> > > >  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.
> 
> It's last line printed by lscpu, so terminal wraps it and from my
> point of view it's still pretty human readable.
> 
> > 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.

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-05-15 12:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-13  3:15 [PATCH] lscpu: add cpu flags entry to summary output WANG Chao
2015-05-13  9:32 ` Karel Zak
2015-05-15  7:37   ` Heiko Carstens
2015-05-15 10:54     ` Karel Zak
2015-05-15 12:40       ` Heiko Carstens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox