svn commit: trunk/busybox: editors scripts

vda at busybox.net vda at busybox.net
Mon Aug 6 13:34:13 UTC 2007


Author: vda
Date: 2007-08-06 06:34:10 -0700 (Mon, 06 Aug 2007)
New Revision: 19412

Log:
patch: fix -p -1 handling
checkstack.pl: add blackfin (by Alex Landau <landau_alex at yahoo.com>)



Modified:
   trunk/busybox/editors/patch.c
   trunk/busybox/scripts/checkstack.pl


Changeset:
Modified: trunk/busybox/editors/patch.c
===================================================================
--- trunk/busybox/editors/patch.c	2007-08-06 12:28:24 UTC (rev 19411)
+++ trunk/busybox/editors/patch.c	2007-08-06 13:34:10 UTC (rev 19412)
@@ -55,10 +55,12 @@
 	int i;
 
 	/* Terminate string at end of source filename */
-	temp = strchr(filename_start_ptr, '\t');
-	if (temp) *temp = 0;
+	temp = strchrnul(filename_start_ptr, '\t');
+	*temp = '\0';
 
-	/* skip over (patch_level) number of leading directories */
+	/* Skip over (patch_level) number of leading directories */
+	if (patch_level == -1)
+		patch_level = INT_MAX;
 	for (i = 0; i < patch_level; i++) {
 		temp = strchr(filename_start_ptr, '/');
 		if (!temp)

Modified: trunk/busybox/scripts/checkstack.pl
===================================================================
--- trunk/busybox/scripts/checkstack.pl	2007-08-06 12:28:24 UTC (rev 19411)
+++ trunk/busybox/scripts/checkstack.pl	2007-08-06 13:34:10 UTC (rev 19412)
@@ -39,6 +39,9 @@
 	if ($arch eq 'arm') {
 		#c0008ffc:	e24dd064	sub	sp, sp, #100	; 0x64
 		$re = qr/.*sub.*sp, sp, #(([0-9]{2}|[3-9])[0-9]{2})/o;
+	} elsif ($arch eq 'blackfin') {
+		#      52:       00 e8 03 00     LINK 0xc;
+		$re = qr/.*LINK (0x$x{1,5});$/o;
 	} elsif ($arch =~ /^i[3456]86$/) {
 		#c0105234:       81 ec ac 05 00 00       sub    $0x5ac,%esp
 		$re = qr/^.*[as][du][db]    \$(0x$x{1,8}),\%esp$/o;




More information about the busybox-cvs mailing list