fix checkstack.pl arch detection
authorEric Sandeen <sandeen@redhat.com>
Fri, 25 Jul 2008 08:45:28 +0000 (01:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Jul 2008 17:53:27 +0000 (10:53 -0700)
uname -m was leaving a newline in $arch, and not passing the tests.

Also, printing the unknown arch on failure is probably helpful.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkstack.pl

index 358f96c75b43b831868fc93c6ed90233a3ea6a71..3eca62566d6b4468412c9ff2afdbb3b5675dc7b6 100755 (executable)
@@ -36,6 +36,7 @@ my (@stack, $re, $dre, $x, $xs);
        my $arch = shift;
        if ($arch eq "") {
                $arch = `uname -m`;
+               chomp($arch);
        }
 
        $x      = "[0-9a-f]";   # hex character
@@ -91,7 +92,7 @@ my (@stack, $re, $dre, $x, $xs);
                #   0:   00 e8 38 01     LINK 0x4e0;
                $re = qr/.*[[:space:]]LINK[[:space:]]*(0x$x{1,8})/o;
        } else {
-               print("wrong or unknown architecture\n");
+               print("wrong or unknown architecture \"$arch\"\n");
                exit
        }
 }