LWN.net Logo

Allow signed integers in kernelconfig

From:  "Mikael Starvik" <mikael.starvik@axis.com>
To:  <kaos@ocs.com.au>, <mec@shout.net>
Subject:  [PATCH] Allow signed integers in kernelconfig
Date:  Wed, 2 Jul 2003 15:07:19 +0200
Cc:  <linux-kernel@vger.kernel.org>

The following patch makes it possible to have signed integers
for kernel configuration parameters (this was allowed before
2.4.21).

/Mikael

diff -u -ru linux/scripts/Configure linux_patch/scripts/Configure
--- linux/scripts/Configure	Fri Jun 13 16:51:39 2003
+++ linux_patch/scripts/Configure	Wed Jul  2 14:43:19 2003
@@ -350,7 +350,7 @@
 	def=${old:-$3}
 	while :; do
 	  readln "$1 ($2) [$def] " "$def" "$old"
-	  if expr "$ans" : '[0-9]*$' > /dev/null; then
+	  if expr "$ans" : '[+-]\?[0-9]*$' > /dev/null; then
             define_int "$2" "$ans"
 	    break
           else


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

Copyright © 2003, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds