93 |
|
|
94 |
static grub_err_t |
static grub_err_t |
95 |
pc_partition_map_iterate (grub_disk_t disk, |
pc_partition_map_iterate (grub_disk_t disk, |
96 |
int (*hook) (const grub_partition_t partition)) |
int (*hook) (grub_disk_t disk, |
97 |
|
const grub_partition_t partition)) |
98 |
{ |
{ |
99 |
struct grub_partition p; |
struct grub_partition p; |
100 |
struct grub_pc_partition pcdata; |
struct grub_pc_partition pcdata; |
146 |
{ |
{ |
147 |
pcdata.dos_part++; |
pcdata.dos_part++; |
148 |
|
|
149 |
if (hook (&p)) |
if (hook (disk, &p)) |
150 |
goto finish; |
goto finish; |
151 |
|
|
152 |
/* Check if this is a BSD partition. */ |
/* Check if this is a BSD partition. */ |
184 |
pcdata.bsd_type = be->fs_type; |
pcdata.bsd_type = be->fs_type; |
185 |
|
|
186 |
if (be->fs_type != GRUB_PC_PARTITION_BSD_TYPE_UNUSED) |
if (be->fs_type != GRUB_PC_PARTITION_BSD_TYPE_UNUSED) |
187 |
if (hook (&p)) |
if (hook (disk, &p)) |
188 |
goto finish; |
goto finish; |
189 |
} |
} |
190 |
} |
} |
226 |
grub_partition_t p; |
grub_partition_t p; |
227 |
struct grub_pc_partition *pcdata; |
struct grub_pc_partition *pcdata; |
228 |
|
|
229 |
auto int find_func (const grub_partition_t partition); |
auto int find_func (grub_disk_t d, const grub_partition_t partition); |
230 |
|
|
231 |
int find_func (const grub_partition_t partition) |
int find_func (grub_disk_t d __attribute__ ((unused)), |
232 |
|
const grub_partition_t partition) |
233 |
{ |
{ |
234 |
struct grub_pc_partition *partdata = partition->data; |
struct grub_pc_partition *partdata = partition->data; |
235 |
if ((pcdata->dos_part == partdata->dos_part || pcdata->dos_part == -1) |
if ((pcdata->dos_part == partdata->dos_part || pcdata->dos_part == -1) |