[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] configure: Exit with code 0 with --help
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH] configure: Exit with code 0 with --help |
Date: |
Fri, 18 Apr 2014 14:25:52 +0800 |
There are two paths to show help and exit, one is with "-h" or "--help",
one is with invalid options.
Only "exit 1" with the latter case.
Signed-off-by: Fam Zheng <address@hidden>
---
configure | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 69b9f56..b195efe 100755
--- a/configure
+++ b/configure
@@ -1087,7 +1087,10 @@ for opt do
;;
--enable-quorum) quorum="yes"
;;
- *) echo "ERROR: unknown option $opt"; show_help="yes"
+ *)
+ echo "ERROR: unknown option $opt"
+ show_help="yes"
+ exit_code=1
;;
esac
done
@@ -1353,7 +1356,7 @@ Advanced options (experts only):
NOTE: The object files are built at the place where configure is launched
EOF
-exit 1
+exit $exit_code
fi
# Now we have handled --enable-tcg-interpreter and know we're not just
--
1.9.2
- [Qemu-devel] [PATCH] configure: Exit with code 0 with --help,
Fam Zheng <=