]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Support multi-header directories
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 9 Dec 2010 17:22:38 +0000 (18:22 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 9 Dec 2010 17:22:38 +0000 (18:22 +0100)
grub-core/fs/squash4.c

index 6fc2bc11bc05bfd243f9c5942b47d5355c6459c3..5bb128f584b4399eeb9b22d2b77e10810c6d9de9 100644 (file)
@@ -227,11 +227,13 @@ grub_squash_iterate_dir (grub_fshelp_node_t dir,
                                  grub_fshelp_node_t node))
 {
   grub_uint32_t off = grub_le_to_cpu32 (dir->ino.offset) >> 16;
-  /* FIXME: determine this.  */
-  unsigned numheaders = 1;
-  unsigned i, j;
+  grub_uint32_t endoff;
+  unsigned i;
 
-  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;
       grub_err_t err;