public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] checkstack: parse architecture correctly
@ 2008-01-14 19:19 Stephen Hemminger
  2008-01-14 19:50 ` Jiri Slaby
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2008-01-14 19:19 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel

The checkstack script wouldn't work because it was picking up the
newline on the end of the output of uname -m.

Also, use a standard perl construct to print error message and
exit with non-zero error code.

Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>

--- a/scripts/checkstack.pl	2008-01-14 11:09:09.000000000 -0800
+++ b/scripts/checkstack.pl	2008-01-14 11:09:51.000000000 -0800
@@ -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,8 +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");
-		exit
+	    	die "wrong or unknown architecture\"$arch\"\n";
 	}
 }
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-14 19:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-14 19:19 [PATCH 1/2] checkstack: parse architecture correctly Stephen Hemminger
2008-01-14 19:50 ` Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox