[coreboot-gerrit] Patch set updated for coreboot: buildgcc: Show excessive arguments and bail out

Nico Huber (nico.h@gmx.de) gerrit at coreboot.org
Tue Sep 20 15:45:10 CEST 2016


Nico Huber (nico.h at gmx.de) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16681

-gerrit

commit 8a28352e1bff621adb474052b7b7383999393426
Author: Nico Huber <nico.huber at secunet.com>
Date:   Tue Sep 20 14:16:43 2016 +0200

    buildgcc: Show excessive arguments and bail out
    
    Also remove a dead line that checks for unknown options: We already let
    `getopt` check that.
    
    Change-Id: I0e829b266e192757d6e455ee4cc608315bb4b7be
    Signed-off-by: Nico Huber <nico.huber at secunet.com>
---
 util/crossgcc/buildgcc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index b4409d4..eca9439 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -725,11 +725,16 @@ while true ; do
 		-n|--nocolor)	shift; \
 			unset red RED green GREEN blue BLUE cyan CYAN NC;;
 		--)		shift; break;;
-		-*)		printf "Invalid option\n\n"; myhelp; exit 1;;
 		*)		break;;
 	esac
 done
 
+if [ $# -gt 0 ]; then
+	printf "Excessive arguments: $*\n"
+	myhelp
+	exit 1
+fi
+
 if [ -n "$PRINTSTABLE" ]; then
 	print_stable
 	exit 0



More information about the coreboot-gerrit mailing list