view sources/patches/busybox-patch.patch @ 1458:60f1087591ac

Add ability to specify a package to rebuild to build.sh with REBUILD= (and then dependencies take it from there to the system image).
author Rob Landley <rob@landley.net>
date Thu, 20 Oct 2011 02:02:10 -0500
parents b37d9183753b
children
line wrap: on
line source

Make -p count "path components" not slashes, so broken /blah//thing paths work.

diff --git a/editors/patch.c b/editors/patch.c
index 1f2a49b..b1f51cf 100644
--- a/editors/patch.c
+++ b/editors/patch.c
@@ -482,11 +482,11 @@ int patch_main(int argc UNUSED_PARAM, char **argv)
 
 				// handle -p path truncation.
 				for (i=0, s = name; *s;) {
+					char *temp = name;
+
 					if ((option_mask32 & FLAG_PATHLEN) && TT.prefix == i) break;
-					if (*(s++)=='/') {
-						name = s;
-						i++;
-					}
+					while (*(s++)=='/') name = s;
+					if (temp != name) i++;
 				}
 
 				if (empty) {