2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
Handle group offset on UFS1. * fs/ufs.c (grub_ufs_sblock): New field 'cylg_mask'. (grub_ufs_read_inode) [!MODE_UFS2]: handle cylg_offset and cylg_mask.
This commit is contained in:
parent
25fbd77a9d
commit
c60cee8ee1
2 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Handle group offset on UFS1.
|
||||
|
||||
* fs/ufs.c (grub_ufs_sblock): New field 'cylg_mask'.
|
||||
(grub_ufs_read_inode) [!MODE_UFS2]: handle cylg_offset and cylg_mask.
|
||||
|
||||
2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Split ufs.mod into ufs1.mod and ufs2.mod.
|
||||
|
|
7
fs/ufs.c
7
fs/ufs.c
|
@ -88,7 +88,7 @@ struct grub_ufs_sblock
|
|||
|
||||
/* The start of the cylinder group. */
|
||||
grub_uint32_t cylg_offset;
|
||||
grub_uint8_t unused3[4];
|
||||
grub_uint32_t cylg_mask;
|
||||
|
||||
grub_uint32_t mtime;
|
||||
grub_uint8_t unused4[12];
|
||||
|
@ -360,6 +360,11 @@ grub_ufs_read_inode (struct grub_ufs_data *data, int ino, char *inode)
|
|||
/* The first block of the group. */
|
||||
int grpblk = group * (grub_le_to_cpu32 (sblock->frags_per_group));
|
||||
|
||||
#ifndef MODE_UFS2
|
||||
grpblk += grub_le_to_cpu32 (sblock->cylg_offset)
|
||||
* (group & (~grub_le_to_cpu32 (sblock->cylg_mask)));
|
||||
#endif
|
||||
|
||||
if (!inode)
|
||||
{
|
||||
inode = (char *) &data->inode;
|
||||
|
|
Loading…
Reference in a new issue