Commit abddaec5 authored by Eric Sandeen's avatar Eric Sandeen Committed by Linus Torvalds

fix checkstack.pl arch detection

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: default avatarEric Sandeen <sandeen@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 585e93ae
...@@ -36,6 +36,7 @@ my (@stack, $re, $dre, $x, $xs); ...@@ -36,6 +36,7 @@ my (@stack, $re, $dre, $x, $xs);
my $arch = shift; my $arch = shift;
if ($arch eq "") { if ($arch eq "") {
$arch = `uname -m`; $arch = `uname -m`;
chomp($arch);
} }
$x = "[0-9a-f]"; # hex character $x = "[0-9a-f]"; # hex character
...@@ -91,7 +92,7 @@ my (@stack, $re, $dre, $x, $xs); ...@@ -91,7 +92,7 @@ my (@stack, $re, $dre, $x, $xs);
# 0: 00 e8 38 01 LINK 0x4e0; # 0: 00 e8 38 01 LINK 0x4e0;
$re = qr/.*[[:space:]]LINK[[:space:]]*(0x$x{1,8})/o; $re = qr/.*[[:space:]]LINK[[:space:]]*(0x$x{1,8})/o;
} else { } else {
print("wrong or unknown architecture\n"); print("wrong or unknown architecture \"$arch\"\n");
exit exit
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment