Explorar el Código

Chris Wilson writes:

i Erik,

I think I found a small bug in your cramfs patch, which I guess you ported
from mkfs.jffs2.c. Therefore this bug might apply to mkfs.jffs2.c as well.

When searching for a file (or device node) to create in a subdirectory,
mkcramfs doesn't remove the parent's path component which it's already
matched. This prevents the sought node from ever being found if it lives
in a subdirectory.
Eric Andersen hace 22 años
padre
commit
32daaa2b2f
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      sources/cramfs.patch

+ 1 - 1
sources/cramfs.patch

@@ -828,7 +828,7 @@
 +					/* Looks like we found a parent of the correct path */
 +					if (name[len] == '/') {
 +						if (e->child) {
-+							return (find_filesystem_entry (e, name, type));
++							return (find_filesystem_entry (e, name + len + 1, type));
 +						} else {
 +							return NULL;
 +						}