From: Karel Zak <kzak@redhat.com>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Bernhard Voelker <mail@bernhard-voelker.de>,
Util-Linux <util-linux@vger.kernel.org>
Subject: Re: chcpu exit code?
Date: Fri, 28 Feb 2014 10:04:18 +0100 [thread overview]
Message-ID: <20140228090418.GA2783@x2.net.home> (raw)
In-Reply-To: <20140228075355.GB4216@osiris>
On Fri, Feb 28, 2014 at 08:53:55AM +0100, Heiko Carstens wrote:
> On Thu, Feb 27, 2014 at 10:46:26AM +0100, Bernhard Voelker wrote:
> > Although the man page does not mention the exit status, I think
> > it's wrong that 'chcpu' exits OK when an action failed or
> > when a bad CPU number was specified:
> >
> > $ ./chcpu -d 0 ; echo $?
> > CPU 0 is not hot pluggable
> > 0
> >
> > $ ./chcpu -g 3 ; echo $?
> > CPU 3 is not configurable
> > 0
> >
> > $ ./chcpu -e 4 ; echo $?
> > CPU 4 does not exist
> > 0
> >
> > WDYT?
>
> The question is: what should chcpu return if it partially succeeded?
>
> # chcpu -d 3-4
> CPU 3 disabled
> CPU 4 does not exist
This is not so unusual situation, we have for example the same thing
in mount -a where
0 - success
32 - mount failure
64 - some mount succeeded
I think we can do something like this with chcpu, my suggestion is
0 - success
1 - failure
64 - partial success
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2014-02-28 9:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 9:46 chcpu exit code? Bernhard Voelker
2014-02-27 15:25 ` Dale R. Worley
2014-02-28 7:53 ` Heiko Carstens
2014-02-28 8:49 ` Bernhard Voelker
2014-02-28 9:04 ` Karel Zak [this message]
2014-03-03 11:23 ` Bernhard Voelker
2014-03-05 10:12 ` Karel Zak
2014-03-05 11:00 ` Bernhard Voelker
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=20140228090418.GA2783@x2.net.home \
--to=kzak@redhat.com \
--cc=heiko.carstens@de.ibm.com \
--cc=mail@bernhard-voelker.de \
--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