196 |
if (grub_ieee1275_claim (addr, size, 0, 0)) |
if (grub_ieee1275_claim (addr, size, 0, 0)) |
197 |
return -1; |
return -1; |
198 |
|
|
199 |
if ((! grub_ieee1275_realmode) && grub_map (addr, addr, size, 0x00)) |
if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_REAL_MODE) |
200 |
|
&& grub_map (addr, addr, size, 0x00)) |
201 |
{ |
{ |
202 |
grub_printf ("map failed: address 0x%x, size 0x%x\n", addr, size); |
grub_printf ("map failed: address 0x%x, size 0x%x\n", addr, size); |
203 |
grub_ieee1275_release (addr, size); |
grub_ieee1275_release (addr, size); |
339 |
if (partition) |
if (partition) |
340 |
{ |
{ |
341 |
unsigned int partno = grub_strtoul (partition, 0, 0); |
unsigned int partno = grub_strtoul (partition, 0, 0); |
342 |
partno--; /* GRUB partition numbering is 0-based. */ |
|
343 |
|
/* GRUB partition numbering is 0-based. */ |
344 |
|
if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS)) |
345 |
|
partno--; |
346 |
|
|
347 |
/* Assume partno will require less than five bytes to encode. */ |
/* Assume partno will require less than five bytes to encode. */ |
348 |
encoding = grub_malloc (grub_strlen (device) + 3 + 5); |
encoding = grub_malloc (grub_strlen (device) + 3 + 5); |