Skip to content

Commit

Permalink
fix checkstack.pl arch detection
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Eric Sandeen authored and torvalds committed Jul 25, 2008
1 parent 585e93a commit abddaec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/checkstack.pl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
my $arch = shift;
if ($arch eq "") {
$arch = `uname -m`;
chomp($arch);
}

$x = "[0-9a-f]"; # hex character
Expand Down Expand Up @@ -91,7 +92,7 @@
# 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
}
}
Expand Down

0 comments on commit abddaec

Please sign in to comment.