Skip to content

Commit abddaec

Browse files
Eric Sandeentorvalds
authored andcommitted
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: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 585e93a commit abddaec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/checkstack.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
my $arch = shift;
3737
if ($arch eq "") {
3838
$arch = `uname -m`;
39+
chomp($arch);
3940
}
4041

4142
$x = "[0-9a-f]"; # hex character
@@ -91,7 +92,7 @@
9192
# 0: 00 e8 38 01 LINK 0x4e0;
9293
$re = qr/.*[[:space:]]LINK[[:space:]]*(0x$x{1,8})/o;
9394
} else {
94-
print("wrong or unknown architecture\n");
95+
print("wrong or unknown architecture \"$arch\"\n");
9596
exit
9697
}
9798
}

0 commit comments

Comments
 (0)