summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorFam Zheng2014-04-18 08:55:36 +0200
committerMichael Tokarev2014-04-27 11:04:18 +0200
commit2d2ad6d0902bb6338f7fc64e52c202439b90f7ce (patch)
treee966c800213a5a691af2b947b086903f0f6c67e6 /configure
parentvl: convert -m to QemuOpts (diff)
downloadqemu-2d2ad6d0902bb6338f7fc64e52c202439b90f7ce.tar.gz
qemu-2d2ad6d0902bb6338f7fc64e52c202439b90f7ce.tar.xz
qemu-2d2ad6d0902bb6338f7fc64e52c202439b90f7ce.zip
configure: Improve help behavior
Old: There are two paths to show help and exit 1, one is with "-h" or "--help", one is with invalid options. New: Show help and exit 0 for --help. On invalid option, don't show the long help and bury the early "ERROR:" line, just give a message pointing to --help. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure7
1 files changed, 5 insertions, 2 deletions
diff --git a/configure b/configure
index b08afc3fb8..2fbec59e96 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"
+ echo "Try '$0 --help' for more information"
+ exit 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 0
fi
# Now we have handled --enable-tcg-interpreter and know we're not just