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@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html