Blame SOURCES/0180-grub-core-fs-hfs.c-Remove-nested-functions.patch

f96e0b
From 1e33a3f3c57c499e8ef08f438b1de69b6da09f9b Mon Sep 17 00:00:00 2001
f96e0b
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
f96e0b
Date: Sat, 2 Mar 2013 11:31:00 +0100
f96e0b
Subject: [PATCH 180/482] 	* grub-core/fs/hfs.c: Remove nested functions.
f96e0b
f96e0b
---
f96e0b
 ChangeLog          |   4 +
f96e0b
 grub-core/fs/hfs.c | 329 ++++++++++++++++++++++++++++++-----------------------
f96e0b
 2 files changed, 192 insertions(+), 141 deletions(-)
f96e0b
f96e0b
diff --git a/ChangeLog b/ChangeLog
f96e0b
index 838d8af..0ca4aae 100644
f96e0b
--- a/ChangeLog
f96e0b
+++ b/ChangeLog
f96e0b
@@ -1,3 +1,7 @@
f96e0b
+2013-03-02  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
+
f96e0b
+	* grub-core/fs/hfs.c: Remove nested functions.
f96e0b
+
f96e0b
 2013-03-01  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
 
f96e0b
 	* grub-core/fs/hfsplus.c (grub_hfsplus_btree_iterate_node): Pass
f96e0b
diff --git a/grub-core/fs/hfs.c b/grub-core/fs/hfs.c
f96e0b
index 4b2b5aa..73ac7f9 100644
f96e0b
--- a/grub-core/fs/hfs.c
f96e0b
+++ b/grub-core/fs/hfs.c
f96e0b
@@ -161,15 +161,15 @@ struct grub_hfs_filerec
f96e0b
 struct grub_hfs_record
f96e0b
 {
f96e0b
   void *key;
f96e0b
-  int keylen;
f96e0b
+  grub_size_t keylen;
f96e0b
   void *data;
f96e0b
-  int datalen;
f96e0b
+  grub_size_t datalen;
f96e0b
 };
f96e0b
 
f96e0b
 static grub_dl_t my_mod;
f96e0b
 
f96e0b
 static int grub_hfs_find_node (struct grub_hfs_data *, char *,
f96e0b
-			       grub_uint32_t, int, char *, int);
f96e0b
+			       grub_uint32_t, int, char *, grub_size_t);
f96e0b
 
f96e0b
 /* Find block BLOCK of the file FILE in the mounted UFS filesystem
f96e0b
    DATA.  The first 3 extents are described by DAT.  If cache is set,
f96e0b
@@ -396,8 +396,8 @@ grub_hfs_mount (grub_disk_t disk)
f96e0b
 
f96e0b
 /* Compare the K1 and K2 catalog file keys using HFS character ordering.  */
f96e0b
 static int
f96e0b
-grub_hfs_cmp_catkeys (struct grub_hfs_catalog_key *k1,
f96e0b
-		      struct grub_hfs_catalog_key *k2)
f96e0b
+grub_hfs_cmp_catkeys (const struct grub_hfs_catalog_key *k1,
f96e0b
+		      const struct grub_hfs_catalog_key *k2)
f96e0b
 {
f96e0b
   /* Taken from hfsutils 3.2.6 and converted to a readable form */
f96e0b
   static const unsigned char hfs_charorder[256] = {
f96e0b
@@ -640,8 +640,8 @@ grub_hfs_cmp_catkeys (struct grub_hfs_catalog_key *k1,
f96e0b
 
f96e0b
 /* Compare the K1 and K2 extent overflow file keys.  */
f96e0b
 static int
f96e0b
-grub_hfs_cmp_extkeys (struct grub_hfs_extent_key *k1,
f96e0b
-		      struct grub_hfs_extent_key *k2)
f96e0b
+grub_hfs_cmp_extkeys (const struct grub_hfs_extent_key *k1,
f96e0b
+		      const struct grub_hfs_extent_key *k2)
f96e0b
 {
f96e0b
   int cmp = k1->forktype - k2->forktype;
f96e0b
   if (cmp == 0)
f96e0b
@@ -660,7 +660,9 @@ grub_hfs_cmp_extkeys (struct grub_hfs_extent_key *k1,
f96e0b
 static grub_err_t
f96e0b
 grub_hfs_iterate_records (struct grub_hfs_data *data, int type, int idx,
f96e0b
 			  int this, int (*node_hook) (struct grub_hfs_node *hnd,
f96e0b
-						      struct grub_hfs_record *))
f96e0b
+						      struct grub_hfs_record *,
f96e0b
+						      void *hook_arg),
f96e0b
+			  void *hook_arg)
f96e0b
 {
f96e0b
   int nodesize = type == 0 ? data->cat_size : data->ext_size;
f96e0b
 
f96e0b
@@ -714,7 +716,7 @@ grub_hfs_iterate_records (struct grub_hfs_data *data, int type, int idx,
f96e0b
 	      - pnt->keylen - 1
f96e0b
 	    };
f96e0b
 
f96e0b
-	  if (node_hook (&node.node, &rec))
f96e0b
+	  if (node_hook (&node.node, &rec, hook_arg))
f96e0b
 	    return 0;
f96e0b
 	}
f96e0b
 
f96e0b
@@ -724,143 +726,178 @@ grub_hfs_iterate_records (struct grub_hfs_data *data, int type, int idx,
f96e0b
   return 0;
f96e0b
 }
f96e0b
 
f96e0b
+struct grub_hfs_find_node_node_found_ctx
f96e0b
+{
f96e0b
+  int found;
f96e0b
+  int isleaf;
f96e0b
+  int done;
f96e0b
+  int type;
f96e0b
+  const char *key;
f96e0b
+  char *datar;
f96e0b
+  grub_size_t datalen;
f96e0b
+};
f96e0b
 
f96e0b
-/* Lookup a record in the mounted filesystem DATA using the key KEY.
f96e0b
-   The index of the node on top of the tree is IDX.  The tree is of
f96e0b
-   the type TYPE (0 = catalog node, 1 = extent overflow node).  Return
f96e0b
-   the data in DATAR with a maximum length of DATALEN.  */
f96e0b
 static int
f96e0b
-grub_hfs_find_node (struct grub_hfs_data *data, char *key,
f96e0b
-		    grub_uint32_t idx, int type, char *datar, int datalen)
f96e0b
+grub_hfs_find_node_node_found (struct grub_hfs_node *hnd, struct grub_hfs_record *rec,
f96e0b
+			       void *hook_arg)
f96e0b
 {
f96e0b
-  int found = -1;
f96e0b
-  int isleaf = 0;
f96e0b
-  int done = 0;
f96e0b
-
f96e0b
-  auto int node_found (struct grub_hfs_node *, struct grub_hfs_record *);
f96e0b
+  struct grub_hfs_find_node_node_found_ctx *ctx = hook_arg;
f96e0b
+  int cmp = 1;
f96e0b
 
f96e0b
-  int node_found (struct grub_hfs_node *hnd, struct grub_hfs_record *rec)
f96e0b
+  if (ctx->type == 0)
f96e0b
+    cmp = grub_hfs_cmp_catkeys (rec->key, (const void *) ctx->key);
f96e0b
+  else
f96e0b
+    cmp = grub_hfs_cmp_extkeys (rec->key, (const void *) ctx->key);
f96e0b
+
f96e0b
+  /* If the key is smaller or equal to the current node, mark the
f96e0b
+     entry.  In case of a non-leaf mode it will be used to lookup
f96e0b
+     the rest of the tree.  */
f96e0b
+  if (cmp <= 0)
f96e0b
+    ctx->found = grub_be_to_cpu32 (grub_get_unaligned32 (rec->data));
f96e0b
+  else /* The key can not be found in the tree. */
f96e0b
+    return 1;
f96e0b
+
f96e0b
+  /* Check if this node is a leaf node.  */
f96e0b
+  if (hnd->type == GRUB_HFS_NODE_LEAF)
f96e0b
     {
f96e0b
-      int cmp = 1;
f96e0b
-
f96e0b
-      if (type == 0)
f96e0b
-	cmp = grub_hfs_cmp_catkeys (rec->key, (void *) key);
f96e0b
-      else
f96e0b
-	cmp = grub_hfs_cmp_extkeys (rec->key, (void *) key);
f96e0b
-
f96e0b
-      /* If the key is smaller or equal to the current node, mark the
f96e0b
-	 entry.  In case of a non-leaf mode it will be used to lookup
f96e0b
-	 the rest of the tree.  */
f96e0b
-      if (cmp <= 0)
f96e0b
-	found = grub_be_to_cpu32 (grub_get_unaligned32 (rec->data));
f96e0b
-      else /* The key can not be found in the tree. */
f96e0b
-	return 1;
f96e0b
-
f96e0b
-      /* Check if this node is a leaf node.  */
f96e0b
-      if (hnd->type == GRUB_HFS_NODE_LEAF)
f96e0b
-	{
f96e0b
-	  isleaf = 1;
f96e0b
+      ctx->isleaf = 1;
f96e0b
 
f96e0b
-	  /* Found it!!!!  */
f96e0b
-	  if (cmp == 0)
f96e0b
-	    {
f96e0b
-              done = 1;
f96e0b
+      /* Found it!!!!  */
f96e0b
+      if (cmp == 0)
f96e0b
+	{
f96e0b
+	  ctx->done = 1;
f96e0b
 
f96e0b
-	      grub_memcpy (datar, rec->data,
f96e0b
-			   rec->datalen < datalen ? rec->datalen : datalen);
f96e0b
-	      return 1;
f96e0b
-	    }
f96e0b
+	  grub_memcpy (ctx->datar, rec->data,
f96e0b
+		       rec->datalen < ctx->datalen ? rec->datalen : ctx->datalen);
f96e0b
+	  return 1;
f96e0b
 	}
f96e0b
-
f96e0b
-      return 0;
f96e0b
     }
f96e0b
 
f96e0b
+  return 0;
f96e0b
+}
f96e0b
+
f96e0b
+
f96e0b
+/* Lookup a record in the mounted filesystem DATA using the key KEY.
f96e0b
+   The index of the node on top of the tree is IDX.  The tree is of
f96e0b
+   the type TYPE (0 = catalog node, 1 = extent overflow node).  Return
f96e0b
+   the data in DATAR with a maximum length of DATALEN.  */
f96e0b
+static int
f96e0b
+grub_hfs_find_node (struct grub_hfs_data *data, char *key,
f96e0b
+		    grub_uint32_t idx, int type, char *datar, grub_size_t datalen)
f96e0b
+{
f96e0b
+  struct grub_hfs_find_node_node_found_ctx ctx =
f96e0b
+    {
f96e0b
+      .found = -1,
f96e0b
+      .isleaf = 0,
f96e0b
+      .done = 0,
f96e0b
+      .type = type,
f96e0b
+      .key = key,
f96e0b
+      .datar = datar,
f96e0b
+      .datalen = datalen
f96e0b
+    };
f96e0b
+
f96e0b
   do
f96e0b
     {
f96e0b
-      found = -1;
f96e0b
+      ctx.found = -1;
f96e0b
 
f96e0b
-      if (grub_hfs_iterate_records (data, type, idx, 0, node_found))
f96e0b
+      if (grub_hfs_iterate_records (data, type, idx, 0, grub_hfs_find_node_node_found, &ctx))
f96e0b
         return 0;
f96e0b
 
f96e0b
-      if (found == -1)
f96e0b
+      if (ctx.found == -1)
f96e0b
         return 0;
f96e0b
 
f96e0b
-      idx = found;
f96e0b
-    } while (! isleaf);
f96e0b
+      idx = ctx.found;
f96e0b
+    } while (! ctx.isleaf);
f96e0b
 
f96e0b
-  return done;
f96e0b
+  return ctx.done;
f96e0b
 }
f96e0b
 
f96e0b
+struct grub_hfs_iterate_dir_node_found_ctx
f96e0b
+{
f96e0b
+  grub_uint32_t dir_be;
f96e0b
+  int found;
f96e0b
+  int isleaf;
f96e0b
+  grub_uint32_t next;
f96e0b
+  int (*hook) (struct grub_hfs_record *, void *hook_arg);
f96e0b
+  void *hook_arg;
f96e0b
+};
f96e0b
 
f96e0b
-/* Iterate over the directory with the id DIR.  The tree is searched
f96e0b
-   starting with the node ROOT_IDX.  For every entry in this directory
f96e0b
-   call HOOK.  */
f96e0b
-static grub_err_t
f96e0b
-grub_hfs_iterate_dir (struct grub_hfs_data *data, grub_uint32_t root_idx,
f96e0b
-		      unsigned int dir, int (*hook) (struct grub_hfs_record *))
f96e0b
+static int
f96e0b
+grub_hfs_iterate_dir_node_found (struct grub_hfs_node *hnd, struct grub_hfs_record *rec,
f96e0b
+				 void *hook_arg)
f96e0b
 {
f96e0b
-  int found = -1;
f96e0b
-  int isleaf = 0;
f96e0b
-  int next = 0;
f96e0b
+  struct grub_hfs_iterate_dir_node_found_ctx *ctx = hook_arg;
f96e0b
+  struct grub_hfs_catalog_key *ckey = rec->key;
f96e0b
 
f96e0b
   /* The lowest key possible with DIR as root directory.  */
f96e0b
-  struct grub_hfs_catalog_key key = {0, grub_cpu_to_be32 (dir), 0, ""};
f96e0b
+  const struct grub_hfs_catalog_key key = {0, ctx->dir_be, 0, ""};
f96e0b
 
f96e0b
-  auto int node_found (struct grub_hfs_node *, struct grub_hfs_record *);
f96e0b
-  auto int it_dir (struct grub_hfs_node * __attribute ((unused)),
f96e0b
-		   struct grub_hfs_record *);
f96e0b
+  if (grub_hfs_cmp_catkeys (rec->key, &key) <= 0)
f96e0b
+    ctx->found = grub_be_to_cpu32 (grub_get_unaligned32 (rec->data));
f96e0b
 
f96e0b
-
f96e0b
-  int node_found (struct grub_hfs_node *hnd, struct grub_hfs_record *rec)
f96e0b
+  if (hnd->type == 0xFF && ckey->strlen > 0)
f96e0b
     {
f96e0b
-      struct grub_hfs_catalog_key *ckey = rec->key;
f96e0b
-
f96e0b
-      if (grub_hfs_cmp_catkeys (rec->key, (void *) &key) <= 0)
f96e0b
-	found = grub_be_to_cpu32 (grub_get_unaligned32 (rec->data));
f96e0b
+      ctx->isleaf = 1;
f96e0b
+      ctx->next = grub_be_to_cpu32 (hnd->next);
f96e0b
 
f96e0b
-      if (hnd->type == 0xFF && ckey->strlen > 0)
f96e0b
-	{
f96e0b
-	  isleaf = 1;
f96e0b
-	  next = grub_be_to_cpu32 (hnd->next);
f96e0b
+      /* An entry was found.  */
f96e0b
+      if (ckey->parent_dir == ctx->dir_be)
f96e0b
+	return ctx->hook (rec, ctx->hook_arg);
f96e0b
+    }
f96e0b
 
f96e0b
-	  /* An entry was found.  */
f96e0b
-	  if (grub_be_to_cpu32 (ckey->parent_dir) == dir)
f96e0b
-	    return hook (rec);
f96e0b
-	}
f96e0b
+  return 0;
f96e0b
+}
f96e0b
 
f96e0b
-      return 0;
f96e0b
-    }
f96e0b
+static int
f96e0b
+grub_hfs_iterate_dir_it_dir (struct grub_hfs_node *hnd __attribute ((unused)),
f96e0b
+			     struct grub_hfs_record *rec,
f96e0b
+			     void *hook_arg)
f96e0b
+{
f96e0b
+  struct grub_hfs_catalog_key *ckey = rec->key;
f96e0b
+  struct grub_hfs_iterate_dir_node_found_ctx *ctx = hook_arg;
f96e0b
+  
f96e0b
+  /* Stop when the entries do not match anymore.  */
f96e0b
+  if (ckey->parent_dir != ctx->dir_be)
f96e0b
+    return 1;
f96e0b
 
f96e0b
-  int it_dir (struct grub_hfs_node *hnd __attribute ((unused)),
f96e0b
-	      struct grub_hfs_record *rec)
f96e0b
-    {
f96e0b
-      struct grub_hfs_catalog_key *ckey = rec->key;
f96e0b
-      struct grub_hfs_catalog_key *origkey = &ke;;
f96e0b
+  return ctx->hook (rec, ctx->hook_arg);
f96e0b
+}
f96e0b
 
f96e0b
-      /* Stop when the entries do not match anymore.  */
f96e0b
-      if (grub_be_to_cpu32 (ckey->parent_dir)
f96e0b
-	  != grub_be_to_cpu32 ((origkey)->parent_dir))
f96e0b
-	return 1;
f96e0b
 
f96e0b
-      return hook (rec);
f96e0b
-    }
f96e0b
+/* Iterate over the directory with the id DIR.  The tree is searched
f96e0b
+   starting with the node ROOT_IDX.  For every entry in this directory
f96e0b
+   call HOOK.  */
f96e0b
+static grub_err_t
f96e0b
+grub_hfs_iterate_dir (struct grub_hfs_data *data, grub_uint32_t root_idx,
f96e0b
+		      grub_uint32_t dir, int (*hook) (struct grub_hfs_record *, void *hook_arg),
f96e0b
+		      void *hook_arg)
f96e0b
+{
f96e0b
+  struct grub_hfs_iterate_dir_node_found_ctx ctx =
f96e0b
+  {
f96e0b
+    .dir_be = grub_cpu_to_be32 (dir),
f96e0b
+    .found = -1,
f96e0b
+    .isleaf = 0,
f96e0b
+    .next = 0,
f96e0b
+    .hook = hook,
f96e0b
+    .hook_arg = hook_arg
f96e0b
+  };
f96e0b
 
f96e0b
   do
f96e0b
     {
f96e0b
-      found = -1;
f96e0b
+      ctx.found = -1;
f96e0b
 
f96e0b
-      if (grub_hfs_iterate_records (data, 0, root_idx, 0, node_found))
f96e0b
+      if (grub_hfs_iterate_records (data, 0, root_idx, 0, grub_hfs_iterate_dir_node_found, &ctx))
f96e0b
         return grub_errno;
f96e0b
 
f96e0b
-      if (found == -1)
f96e0b
+      if (ctx.found == -1)
f96e0b
         return 0;
f96e0b
 
f96e0b
-      root_idx = found;
f96e0b
-    } while (! isleaf);
f96e0b
+      root_idx = ctx.found;
f96e0b
+    } while (! ctx.isleaf);
f96e0b
 
f96e0b
   /* If there was a matching record in this leaf node, continue the
f96e0b
      iteration until the last record was found.  */
f96e0b
-  grub_hfs_iterate_records (data, 0, next, 1, it_dir);
f96e0b
+  grub_hfs_iterate_records (data, 0, ctx.next, 1, grub_hfs_iterate_dir_it_dir, &ctx;;
f96e0b
   return grub_errno;
f96e0b
 }
f96e0b
 
f96e0b
@@ -1148,56 +1185,66 @@ grub_hfs_find_dir (struct grub_hfs_data *data, const char *path,
f96e0b
   return grub_errno;
f96e0b
 }
f96e0b
 
f96e0b
-
f96e0b
-
f96e0b
-static grub_err_t
f96e0b
-grub_hfs_dir (grub_device_t device, const char *path, grub_fs_dir_hook_t hook,
f96e0b
-	      void *hook_data)
f96e0b
+struct grub_hfs_dir_hook_ctx
f96e0b
 {
f96e0b
-  int inode;
f96e0b
+  grub_fs_dir_hook_t hook;
f96e0b
+  void *hook_data;
f96e0b
+};
f96e0b
 
f96e0b
-  auto int dir_hook (struct grub_hfs_record *rec);
f96e0b
+static int
f96e0b
+grub_hfs_dir_hook (struct grub_hfs_record *rec, void *hook_arg)
f96e0b
+{
f96e0b
+  struct grub_hfs_dir_hook_ctx *ctx = hook_arg;
f96e0b
+  struct grub_hfs_dirrec *drec = rec->data;
f96e0b
+  struct grub_hfs_filerec *frec = rec->data;
f96e0b
+  struct grub_hfs_catalog_key *ckey = rec->key;
f96e0b
+  char fname[sizeof (ckey->str) * MAX_UTF8_PER_MAC_ROMAN + 1];
f96e0b
+  struct grub_dirhook_info info;
f96e0b
+  grub_size_t len;
f96e0b
 
f96e0b
-  int dir_hook (struct grub_hfs_record *rec)
f96e0b
-    {
f96e0b
-      struct grub_hfs_dirrec *drec = rec->data;
f96e0b
-      struct grub_hfs_filerec *frec = rec->data;
f96e0b
-      struct grub_hfs_catalog_key *ckey = rec->key;
f96e0b
-      char fname[sizeof (ckey->str) * MAX_UTF8_PER_MAC_ROMAN + 1];
f96e0b
-      struct grub_dirhook_info info;
f96e0b
-      grub_size_t len;
f96e0b
+  grub_memset (fname, 0, sizeof (fname));
f96e0b
 
f96e0b
-      grub_memset (fname, 0, sizeof (fname));
f96e0b
+  grub_memset (&info, 0, sizeof (info));
f96e0b
 
f96e0b
-      grub_memset (&info, 0, sizeof (info));
f96e0b
+  len = ckey->strlen;
f96e0b
+  if (len > sizeof (ckey->str))
f96e0b
+    len = sizeof (ckey->str);
f96e0b
+  macroman_to_utf8 (fname, ckey->str, len, 1);
f96e0b
 
f96e0b
-      len = ckey->strlen;
f96e0b
-      if (len > sizeof (ckey->str))
f96e0b
-	len = sizeof (ckey->str);
f96e0b
-      macroman_to_utf8 (fname, ckey->str, len, 1);
f96e0b
+  info.case_insensitive = 1;
f96e0b
 
f96e0b
-      info.case_insensitive = 1;
f96e0b
+  if (drec->type == GRUB_HFS_FILETYPE_DIR)
f96e0b
+    {
f96e0b
+      info.dir = 1;
f96e0b
+      info.mtimeset = 1;
f96e0b
+      info.mtime = grub_be_to_cpu32 (drec->mtime) - 2082844800;
f96e0b
+      return ctx->hook (fname, &info, ctx->hook_data);
f96e0b
+    }
f96e0b
+  if (frec->type == GRUB_HFS_FILETYPE_FILE)
f96e0b
+    {
f96e0b
+      info.dir = 0;
f96e0b
+      info.mtimeset = 1;
f96e0b
+      info.mtime = grub_be_to_cpu32 (frec->mtime) - 2082844800;
f96e0b
+      return ctx->hook (fname, &info, ctx->hook_data);
f96e0b
+    }
f96e0b
 
f96e0b
-      if (drec->type == GRUB_HFS_FILETYPE_DIR)
f96e0b
-	{
f96e0b
-	  info.dir = 1;
f96e0b
-	  info.mtimeset = 1;
f96e0b
-	  info.mtime = grub_be_to_cpu32 (drec->mtime) - 2082844800;
f96e0b
-	  return hook (fname, &info, hook_data);
f96e0b
-	}
f96e0b
-      if (frec->type == GRUB_HFS_FILETYPE_FILE)
f96e0b
-	{
f96e0b
-	  info.dir = 0;
f96e0b
-	  info.mtimeset = 1;
f96e0b
-	  info.mtime = grub_be_to_cpu32 (frec->mtime) - 2082844800;
f96e0b
-	  return hook (fname, &info, hook_data);
f96e0b
-	}
f96e0b
+  return 0;
f96e0b
+}
f96e0b
 
f96e0b
-      return 0;
f96e0b
-    }
f96e0b
+
f96e0b
+static grub_err_t
f96e0b
+grub_hfs_dir (grub_device_t device, const char *path, grub_fs_dir_hook_t hook,
f96e0b
+	      void *hook_data)
f96e0b
+{
f96e0b
+  int inode;
f96e0b
 
f96e0b
   struct grub_hfs_data *data;
f96e0b
   struct grub_hfs_filerec frec;
f96e0b
+  struct grub_hfs_dir_hook_ctx ctx =
f96e0b
+    {
f96e0b
+      .hook = hook,
f96e0b
+      .hook_data = hook_data
f96e0b
+    };
f96e0b
 
f96e0b
   grub_dl_ref (my_mod);
f96e0b
 
f96e0b
@@ -1215,7 +1262,7 @@ grub_hfs_dir (grub_device_t device, const char *path, grub_fs_dir_hook_t hook,
f96e0b
       goto fail;
f96e0b
     }
f96e0b
 
f96e0b
-  grub_hfs_iterate_dir (data, data->cat_root, inode, dir_hook);
f96e0b
+  grub_hfs_iterate_dir (data, data->cat_root, inode, grub_hfs_dir_hook, &ctx;;
f96e0b
 
f96e0b
  fail:
f96e0b
   grub_free (data);
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b