Fix return code of xentop
PATCH 1/1 Fix return code of xentop
Hi,
When I tested the xentop with a wrong option, the xentop returned the return code 0.
# xentop --abc xentop: unrecognized option `--abc' Usage: xentop [OPTION] Displays ongoing information about xen vm resources <snip> # echo $? 0
If the wrong option was specified, I think that the xentop had better return the return code 1 (or not 0). This patch fixes the return code of the xentop when the wrong option was specified.
Signed-off-by Masaki Kanno <[email protected]>
Best regards,
Kan
tools/xenstat/xentop/xentop.c +3 -1
@@ -998,9 +998,11 @@ int main(int argc, char **argv)while ((opt =getopt_long (argc, argv, sopts, lopts, &optind)) !=-1 ) {switch (opt) { -case 'h' :case '?' :default : +usage (argv[0 ]); +exit (1 ); +case 'h' :usage (argv[0 ]);exit (0 );case 'V' :
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel