Mailing List Archive

[xen-unstable] Fix xentop error return code if passed unrecognised options.
# HG changeset patch
# User kaf24@localhost.localdomain
# Date 1169976827 0
# Node ID 4e7bda043cced371f098bb3bee486ed57d6388c2
# Parent d1710eb353855a5fac71e5507deb3d3a131a7de2
Fix xentop error return code if passed unrecognised options.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
---
tools/xenstat/xentop/xentop.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff -r d1710eb35385 -r 4e7bda043cce tools/xenstat/xentop/xentop.c
--- a/tools/xenstat/xentop/xentop.c Sat Jan 27 13:32:27 2007 +0000
+++ b/tools/xenstat/xentop/xentop.c Sun Jan 28 09:33:47 2007 +0000
@@ -998,9 +998,11 @@ int main(int argc, char **argv)

while ((opt = getopt_long(argc, argv, sopts, lopts, &optind)) != -1) {
switch (opt) {
+ default:
+ usage(argv[0]);
+ exit(1);
+ case '?':
case 'h':
- case '?':
- default:
usage(argv[0]);
exit(0);
case 'V':

_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xensource.com
http://lists.xensource.com/xen-changelog