xenpm: make argument parsing and error handling more consistent
authorJan Beulich <jbeulich@suse.com>
Mon, 17 Sep 2012 08:09:59 +0000 (10:09 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 17 Sep 2012 08:09:59 +0000 (10:09 +0200)
commitae165a06593ad65c305889e3aaa0fefa6b8ed0b1
tree5ceafb18fcf7b2ceacc03be9c8458dbb9a3e84c7
parent8f5f42e36f9b6a1213bdbdf680cc9f9e2349cbaa
xenpm: make argument parsing and error handling more consistent

Specifically, what values are or aren't accepted as CPU identifier, and
how the values get interpreted should be consistent across sub-commands
(intended behavior now: non-negative values are okay, and along with
omitting the argument, specifying "all" will also be accepted).

For error handling, error messages should get consistently issued to
stderr, and the tool should now (hopefully) produce an exit code of
zero only in the (partial) success case (there may still be a small
number of questionable cases).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
tools/misc/xenpm.c