/[grub]/grub2/fs/minix.c
ViewVC logotype

Diff of /grub2/fs/minix.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by marco_g, Mon May 24 21:32:21 2004 UTC revision 1.2 by marco_g, Tue Aug 24 20:32:47 2004 UTC
# Line 126  grub_minix_get_file_block (struct grub_m Line 126  grub_minix_get_file_block (struct grub_m
126    struct grub_minix_sblock *sblock = &data->sblock;    struct grub_minix_sblock *sblock = &data->sblock;
127    int indir;    int indir;
128    
129      auto int grub_get_indir (int, int);
130    
131    /* Read the block pointer in ZONE, on the offset NUM.  */    /* Read the block pointer in ZONE, on the offset NUM.  */
132    int grub_get_indir (int zone, int num)    int grub_get_indir (int zone, int num)
133      {      {
134        if (data->version == 1)        if (data->version == 1)
135          {          {
136            grub_uint16_t indir;            grub_uint16_t indir16;
137            grub_disk_read (data->disk,            grub_disk_read (data->disk,
138                            zone << GRUB_MINIX_LOG2_ZONESZ,                            zone << GRUB_MINIX_LOG2_ZONESZ,
139                            sizeof (grub_uint16_t) * num,                            sizeof (grub_uint16_t) * num,
140                            sizeof (grub_uint16_t), (char *) &indir);                            sizeof (grub_uint16_t), (char *) &indir16);
141            return grub_le_to_cpu16 (indir);            return grub_le_to_cpu16 (indir16);
142          }          }
143        else        else
144          {          {
145            grub_uint32_t indir;            grub_uint32_t indir32;
146            grub_disk_read (data->disk,            grub_disk_read (data->disk,
147                            zone << GRUB_MINIX_LOG2_ZONESZ,                            zone << GRUB_MINIX_LOG2_ZONESZ,
148                            sizeof (grub_uint32_t) * num,                            sizeof (grub_uint32_t) * num,
149                            sizeof (grub_uint32_t), (char *) &indir);                            sizeof (grub_uint32_t), (char *) &indir32);
150            return grub_le_to_cpu32 (indir);            return grub_le_to_cpu32 (indir32);
151          }          }
152      }      }
153        

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26