2004-08-24 Marco Gerards <metgerards@student.han.nl>
* commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional. (grub_boot_fini) [GRUB_UTIL]: Likewise. (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise. (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise. * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'. (grub_hfs_iterate_dir): Make the function static. Add prototypes for `node_found' and `it_dir'. (grub_hfs_dir): Add prototype for `dir_hook'. * fs/minix.c (grub_minix_get_file_block): Add prototype for `grub_get_indir'. Rename `indir' in two blocks to `indir16' and `indir32' to silence a gcc warning. * include/grub/fs.h (grub_hfs_init): New prototype. (grub_hfs_fini): Likewise.
This commit is contained in:
parent
97543f08fc
commit
94bc45af05
5 changed files with 43 additions and 10 deletions
14
fs/minix.c
14
fs/minix.c
|
@ -126,26 +126,28 @@ grub_minix_get_file_block (struct grub_minix_data *data, unsigned int blk)
|
|||
struct grub_minix_sblock *sblock = &data->sblock;
|
||||
int indir;
|
||||
|
||||
auto int grub_get_indir (int, int);
|
||||
|
||||
/* Read the block pointer in ZONE, on the offset NUM. */
|
||||
int grub_get_indir (int zone, int num)
|
||||
{
|
||||
if (data->version == 1)
|
||||
{
|
||||
grub_uint16_t indir;
|
||||
grub_uint16_t indir16;
|
||||
grub_disk_read (data->disk,
|
||||
zone << GRUB_MINIX_LOG2_ZONESZ,
|
||||
sizeof (grub_uint16_t) * num,
|
||||
sizeof (grub_uint16_t), (char *) &indir);
|
||||
return grub_le_to_cpu16 (indir);
|
||||
sizeof (grub_uint16_t), (char *) &indir16);
|
||||
return grub_le_to_cpu16 (indir16);
|
||||
}
|
||||
else
|
||||
{
|
||||
grub_uint32_t indir;
|
||||
grub_uint32_t indir32;
|
||||
grub_disk_read (data->disk,
|
||||
zone << GRUB_MINIX_LOG2_ZONESZ,
|
||||
sizeof (grub_uint32_t) * num,
|
||||
sizeof (grub_uint32_t), (char *) &indir);
|
||||
return grub_le_to_cpu32 (indir);
|
||||
sizeof (grub_uint32_t), (char *) &indir32);
|
||||
return grub_le_to_cpu32 (indir32);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue