util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: faizan husain <faizanh@linux.vnet.ibm.com>
To: Faizan husain <faizanh@linux.vnet.ibm.com>, util-linux@vger.kernel.org
Subject: Re: [PATCH] lscpu : -b and -c option does not give expected output.
Date: Mon, 06 Aug 2012 10:38:53 +0530	[thread overview]
Message-ID: <501F5165.6080007@linux.vnet.ibm.com> (raw)
In-Reply-To: <1344163028-30238-1-git-send-email-faizanh@linux.vnet.ibm.com>

On Sunday 05 August 2012 04:07 PM, Faizan husain wrote:
> From: faizan husain <faizanh@linux.vnet.ibm.com>
>
> Options for lscpu command are giving incorrect output.
> As per the man page or help, '-b' option should limit the output to online CPUs
> and '-c' option should limit the output to offline CPUs.
> But we could see the output is same for '-a','-b' and '-c' options.
>
> Signed-off-by: faizan husain <faizanh@linux.vnet.ibm.com>
> ---
>   sys-utils/lscpu.c |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
> index b93998a..648f51e 100644
> --- a/sys-utils/lscpu.c
> +++ b/sys-utils/lscpu.c
> @@ -1101,12 +1101,12 @@ print_summary(struct lscpu_desc *desc, struct lscpu_modifier *mod)
>   #endif
>   	print_n(_("CPU(s):"), desc->ncpus);
>
> -	if (desc->online)
> +	if (desc->online && mod->online)
>   		print_cpuset(mod->hex ? _("On-line CPU(s) mask:") :
>   					_("On-line CPU(s) list:"),
>   				desc->online, mod->hex);
>
> -	if (desc->online && CPU_COUNT_S(setsize, desc->online) != desc->ncpus) {
> +	if (desc->online && mod->online && CPU_COUNT_S(setsize, desc->online) != desc->ncpus) {
>   		cpu_set_t *set;
>
>   		/* Linux kernel provides cpuset of off-line CPUs that contains

please discard this patch as wrong patch has been sent, I will resend the patch again..

Thanks

Faizan


  reply	other threads:[~2012-08-06  5:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-05 10:37 [PATCH] lscpu : -b and -c option does not give expected output Faizan husain
2012-08-06  5:08 ` faizan husain [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-08-06  5:10 Faizan husain
2012-08-06 11:50 ` Heiko Carstens
2012-08-07  5:30   ` faizan husain
2012-08-07  7:35     ` Heiko Carstens
2012-08-07  8:23       ` Bernhard Voelker
2012-08-07  9:01       ` faizan husain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=501F5165.6080007@linux.vnet.ibm.com \
    --to=faizanh@linux.vnet.ibm.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).