[BusyBox] [PATCH] genext2fs.c
Geoffrey Espin
espin at idiom.com
Fri May 3 15:23:38 UTC 2002
Sorry, more buildroot noise...
I wasted a few hours thinking I could add to genext2fs what
mkfs.jffs2 'device_table' could do. I realize now, that that is
a much bigger undertaking.
What got me started was some garbled chars when I fed the tuxscreen's
devicetable for mkfs.jffs2 into genext2fs... with this patch I now at
least get readable messages which were trashed due to a early free().
/home/espin/www/tuxscreen/buildroot-tux/build/genext2fs-1.3.orig/genext2fs -i 1000 -b 4000 -d /home/espin/www/tuxscreen/buildroot-tux/root -D /home/espin/www/tuxscreen/buildroot-tux/sources/device_table.txt /home/espin/www/tuxscreen/buildroot-tux/build/tuxscreen-image
/bin/tinylogin: Type 'f' is not supported
/etc/shadow: Type 'f' is not supported
/etc/shadow: Type 'f' is not supported
/usr/share/udhcpc/default.script: Type 'f' is not supported
Before, the filenames were just unreadable control-chars.
Because genextfs's '-d' option seems to allow, or imply, multiple
root directories, it is not clear how -D/--devtable is coordinated.
Geoff
--
Geoffrey Espin
espin at idiom.com
--
--- genext2fs.c.ORIG Thu May 2 15:03:43 2002
+++ genext2fs.c Fri May 3 14:00:33 2002
@@ -1467,12 +1467,12 @@
name = basename(path);
dir = dirname(path);
- free(path);
if(!(nod = find_path(fs, EXT2_ROOT_INO, dir)))
errexit("can't find directory '%s' to create '%s''", dir, name);
free(dir);
if((!strcmp(name, ".")) || (!strcmp(name, "..")))
{
+ free(path);
free(name);
return 1;
}
@@ -1511,6 +1511,7 @@
fprintf(stderr,"%s: Type '%c' is not supported\n", path, type);
}
+ free(path);
free(name);
return 0;
}
More information about the busybox
mailing list