+2012-05-17 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/fs/fat.c (grub_fat_find_dir): Fix error message.
+ New argument origpath. All users updated.
+
2012-05-15 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/ntfs.c (read_data): Prevent overflow.
If HOOK is specified, call it with each file name. */
static char *
grub_fat_find_dir (grub_disk_t disk, struct grub_fat_data *data,
- const char *path,
+ const char *path, const char *origpath,
int (*hook) (const char *filename,
const struct grub_dirhook_info *info))
{
char *dirname, *dirp;
- char *origpath = NULL;
int call_hook;
int found = 0;
return 0;
}
- origpath = grub_strdup (path);
- if (!origpath)
- return 0;
-
/* Extract a directory name. */
while (*path == '/')
path++;
fail:
grub_free (dirname);
- grub_free (origpath);
return found ? dirp : 0;
}
do
{
- p = grub_fat_find_dir (disk, data, p, hook);
+ p = grub_fat_find_dir (disk, data, p, path, hook);
}
while (p && grub_errno == GRUB_ERR_NONE);
do
{
- p = grub_fat_find_dir (file->device->disk, data, p, 0);
+ p = grub_fat_find_dir (file->device->disk, data, p, name, 0);
if (grub_errno != GRUB_ERR_NONE)
goto fail;
}