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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <9b2de540-7ff6-4853-8331-5b9f0d28051c@mail.eladian.com>
Date:	Thu, 19 Jul 2012 17:49:53 -0400 (EDT)
From:	Daniel Wisehart <daniel.wisehart@...dian.com>
To:	linux-kernel@...r.kernel.org
Cc:	alan@...hat.com
Subject: [PATCH] scripts/patch-kernel fix

Takes care of errors when running something like:

$ ./scripts/patch-kernel . .. 3.5
Current kernel version is 3.5.0-rc7 ( Saber-toothed Squirrel)
./scripts/patch-kernel: line 229: [: -lt: unary operator expected
./scripts/patch-kernel: line 252: [: -gt: unary operator expected


diff --git a/scripts/patch-kernel b/scripts/patch-kernel
index d000ea3..a7672eb 100755
--- a/scripts/patch-kernel
+++ b/scripts/patch-kernel
@@ -226,7 +226,7 @@ fi
 
 # This all assumes a 2.6.x[.y] kernel tree.
 # Don't allow backwards/reverse patching.
-if [ $STOPSUBLEVEL -lt $SUBLEVEL ]; then
+if [ "$STOPSUBLEVEL"0 -lt "$SUBLEVEL"0 ]; then
        backwards
 fi
 
@@ -249,7 +249,7 @@ fi
 # If not ending sublevel is specified, it is incremented until
 # no further sublevels are found.
 
-if [ $STOPSUBLEVEL -gt $SUBLEVEL ]; then
+if [ "$STOPSUBLEVEL"0 -gt "$SUBLEVEL"0 ]; then
 while :                                # incrementing SUBLEVEL (s in v.p.s)
 do
     CURRENTFULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL"



This communication is restricted - please see http://www.eladian.com for further information.
--
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