lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20090525125546.GC12943@sepie.suse.cz>
Date:	Mon, 25 May 2009 14:55:46 +0200
From:	Michal Marek <mmarek@...e.cz>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	Sam Ravnborg <sam@...nborg.org>, linux-kernel@...r.kernel.org
Subject: [PATCH 2/3] kbuild: simplify argument loop in scripts/config

Signed-off-by: Michal Marek <mmarek@...e.cz>
---
 scripts/config |   44 ++++++++++++++++----------------------------
 1 files changed, 16 insertions(+), 28 deletions(-)

diff --git a/scripts/config b/scripts/config
index 144e4b0..731c4a7 100755
--- a/scripts/config
+++ b/scripts/config
@@ -77,8 +77,7 @@ if [ "$1" = "--file" ]; then
 	if [ "$FN" = "" ] ; then
 		usage
 	fi
-	shift
-	shift
+	shift 2
 else
 	FN=.config
 fi
@@ -91,26 +90,34 @@ while [ "$1" != "" ] ; do
 	CMD="$1"
 	shift
 	case "$CMD" in
-	--enable|-e)
+	--refresh)
+		;;
+	--*-after)
+		checkarg "$1"
+		A=$ARG
+		checkarg "$2"
+		B=$ARG
+		shift 2
+		;;
+	--*)
 		checkarg "$1"
-		set_var "CONFIG_$ARG" "CONFIG_$ARG=y"
 		shift
 		;;
+	esac
+	case "$CMD" in
+	--enable|-e)
+		set_var "CONFIG_$ARG" "CONFIG_$ARG=y"
+		;;
 
 	--disable|-d)
-		checkarg "$1"
 		set_var "CONFIG_$ARG" "# CONFIG_$ARG is not set"
-		shift
 		;;
 
 	--module|-m)
-		checkarg "$1"
 		set_var "CONFIG_$ARG" "CONFIG_$ARG=m"
-		shift
 		;;
 
 	--state|-s)
-		checkarg "$1"
 		if grep -q "# CONFIG_$ARG is not set" $FN ; then
 			echo n
 		else
@@ -123,37 +130,18 @@ while [ "$1" != "" ] ; do
 				echo "$V"
 			fi
 		fi
-		shift
 		;;
 
 	--enable-after|-E)
-		checkarg "$1"
-		A=$ARG
-		checkarg "$2"
-		B=$ARG
 		set_var "CONFIG_$B" "CONFIG_$B=y" "CONFIG_$A"
-		shift
-		shift
 		;;
 
 	--disable-after|-D)
-		checkarg "$1"
-		A=$ARG
-		checkarg "$2"
-		B=$ARG
 		set_var "CONFIG_$B" "# CONFIG_$B is not set" "CONFIG_$A"
-		shift
-		shift
 		;;
 
 	--module-after|-M)
-		checkarg "$1"
-		A=$ARG
-		checkarg "$2"
-		B=$ARG
 		set_var "CONFIG_$B" "CONFIG_$B=m" "CONFIG_$A"
-		shift
-		shift
 		;;
 
 	# undocumented because it ignores --file (fixme)
-- 
1.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ