Support multi-header directories

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-12-09 18:22:38 +01:00
parent 948ebd7e91
commit 99f0735fb8

View file

@ -227,11 +227,13 @@ grub_squash_iterate_dir (grub_fshelp_node_t dir,
grub_fshelp_node_t node)) grub_fshelp_node_t node))
{ {
grub_uint32_t off = grub_le_to_cpu32 (dir->ino.offset) >> 16; grub_uint32_t off = grub_le_to_cpu32 (dir->ino.offset) >> 16;
/* FIXME: determine this. */ grub_uint32_t endoff;
unsigned numheaders = 1; unsigned i;
unsigned i, j;
for (j = 0; j < numheaders; j++) /* FIXME: why - 3 ? */
endoff = (grub_le_to_cpu32 (dir->ino.offset) & 0xffff) + off - 3;
while (off < endoff)
{ {
struct grub_squash_dirent_header dh; struct grub_squash_dirent_header dh;
grub_err_t err; grub_err_t err;