mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-28 18:19:23 +00:00
* grub-core/fs/xfs.c (grub_xfs_iterate_dir): Handle read_inode errors.
This commit is contained in:
1 parent
f45c794ab5
commit
3b4afb4de1
2 files changed
+14
-1
No files matched your search
@@ -1,3 +1,7 @@
|
|||||||
|
2012-05-03 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/fs/xfs.c (grub_xfs_iterate_dir): Handle read_inode errors.
|
||||||
|
|
||||||
2012-05-03 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-05-03 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/fs/xfs.c (GRUB_XFS_EXTENT_BLOCK): Fix bitmask.
|
* grub-core/fs/xfs.c (GRUB_XFS_EXTENT_BLOCK): Fix bitmask.
|
||||||
|
|||||||
+10
-1
@@ -456,19 +456,28 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
|
|||||||
int NESTED_FUNC_ATTR call_hook (grub_uint64_t ino, const char *filename)
|
int NESTED_FUNC_ATTR call_hook (grub_uint64_t ino, const char *filename)
|
||||||
{
|
{
|
||||||
struct grub_fshelp_node *fdiro;
|
struct grub_fshelp_node *fdiro;
|
||||||
|
grub_err_t err;
|
||||||
|
|
||||||
fdiro = grub_malloc (sizeof (struct grub_fshelp_node)
|
fdiro = grub_malloc (sizeof (struct grub_fshelp_node)
|
||||||
- sizeof (struct grub_xfs_inode)
|
- sizeof (struct grub_xfs_inode)
|
||||||
+ (1 << diro->data->sblock.log2_inode));
|
+ (1 << diro->data->sblock.log2_inode));
|
||||||
if (!fdiro)
|
if (!fdiro)
|
||||||
|
{
|
||||||
|
grub_print_error ();
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* The inode should be read, otherwise the filetype can
|
/* The inode should be read, otherwise the filetype can
|
||||||
not be determined. */
|
not be determined. */
|
||||||
fdiro->ino = ino;
|
fdiro->ino = ino;
|
||||||
fdiro->inode_read = 1;
|
fdiro->inode_read = 1;
|
||||||
fdiro->data = diro->data;
|
fdiro->data = diro->data;
|
||||||
grub_xfs_read_inode (diro->data, ino, &fdiro->inode);
|
err = grub_xfs_read_inode (diro->data, ino, &fdiro->inode);
|
||||||
|
if (err)
|
||||||
|
{
|
||||||
|
grub_print_error ();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return hook (filename,
|
return hook (filename,
|
||||||
grub_xfs_mode_to_filetype (fdiro->inode.mode),
|
grub_xfs_mode_to_filetype (fdiro->inode.mode),
|
||||||
|
|||||||
Reference in new issue
Block a user