From 27e55b8cf1bd33b383cc15ab8bc23237624f2d58 Mon Sep 17 00:00:00 2001 From: Masamichi Takagi Date: Mon, 30 Jul 2018 19:12:59 +0900 Subject: [PATCH] mcreboot.sh: Fix error reporting for missing argment Change-Id: I3af99d7a117d4401c2e0a143fa74513094a53302 --- arch/x86_64/tools/mcreboot-smp-x86.sh.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86_64/tools/mcreboot-smp-x86.sh.in b/arch/x86_64/tools/mcreboot-smp-x86.sh.in index e4594864..f84ce034 100644 --- a/arch/x86_64/tools/mcreboot-smp-x86.sh.in +++ b/arch/x86_64/tools/mcreboot-smp-x86.sh.in @@ -50,7 +50,7 @@ umask_old=`umask` idle_halt="" allow_oversubscribe="" -while getopts :stk:c:m:o:f:r:q:i:d:e:hO OPT +while getopts stk:c:m:o:f:r:q:i:d:e:hO OPT do case ${OPT} in f) facility=${OPTARG} @@ -81,8 +81,8 @@ do ;; O) allow_oversubscribe="allow_oversubscribe" ;; - *) echo "invalid option -${OPT}" >&2 - exit 1 + \?) exit 1 + ;; esac done