merge mainline into hints

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-12-23 18:49:00 +01:00
commit 17785932df
448 changed files with 43023 additions and 10176 deletions

View file

@ -32,7 +32,8 @@ struct grub_nand_data
};
static int
grub_nand_iterate (int (*hook) (const char *name))
grub_nand_iterate (int (*hook) (const char *name),
grub_disk_pull_t pull)
{
auto int dev_iterate (struct grub_ieee1275_devalias *alias);
int dev_iterate (struct grub_ieee1275_devalias *alias)
@ -46,6 +47,9 @@ grub_nand_iterate (int (*hook) (const char *name))
return 0;
}
if (pull != GRUB_DISK_PULL_NONE)
return 0;
return grub_devalias_iterate (dev_iterate);
}

View file

@ -152,9 +152,14 @@ scan (void)
}
static int
grub_ofdisk_iterate (int (*hook) (const char *name))
grub_ofdisk_iterate (int (*hook) (const char *name),
grub_disk_pull_t pull)
{
unsigned i;
if (pull != GRUB_DISK_PULL_NONE)
return 0;
scan ();
for (i = 0; i < ARRAY_SIZE (ofdisk_hash); i++)
@ -252,14 +257,24 @@ grub_ofdisk_open (const char *name, grub_disk_t disk)
grub_dprintf ("disk", "Opening `%s'.\n", devpath);
if (grub_ieee1275_finddevice (devpath, &dev))
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't read device properties");
{
grub_free (devpath);
return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
"can't read device properties");
}
if (grub_ieee1275_get_property (dev, "device_type", prop, sizeof (prop),
&actual))
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't read the device type");
{
grub_free (devpath);
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't read the device type");
}
if (grub_strcmp (prop, "block"))
return grub_error (GRUB_ERR_BAD_DEVICE, "not a block device");
{
grub_free (devpath);
return grub_error (GRUB_ERR_BAD_DEVICE, "not a block device");
}
/* XXX: There is no property to read the number of blocks. There
should be a property `#blocks', but it is not there. Perhaps it