[PATCH] fix checkstack.pl arch detection
From: Eric Sandeen
Date: Fri May 02 2008 - 13:21:19 EST
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@xxxxxxxxxx>
---
Index: linux-2.6.25/scripts/checkstack.pl
===================================================================
--- linux-2.6.25.orig/scripts/checkstack.pl 2008-05-02 12:17:59.000000000 -0500
+++ linux-2.6.25/scripts/checkstack.pl 2008-05-02 12:18:15.426407528 -0500
@@ -32,6 +32,7 @@ my (@stack, $re, $x, $xs);
my $arch = shift;
if ($arch eq "") {
$arch = `uname -m`;
+ chomp($arch);
}
$x = "[0-9a-f]"; # hex character
@@ -85,7 +86,7 @@ my (@stack, $re, $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
}
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/