Merge from trunk

This commit is contained in:
Robert Millan 2009-12-12 00:07:45 +00:00
commit 37ba589a4e
90 changed files with 2241 additions and 3762 deletions

View file

@ -388,7 +388,7 @@ grub_ata_device_initialize (int port, int device, int addr, int addr2)
}
static int NESTED_FUNC_ATTR
grub_ata_pciinit (int bus, int device, int func,
grub_ata_pciinit (grub_pci_device_t dev,
grub_pci_id_t pciid __attribute__((unused)))
{
static int compat_use[2] = { 0 };
@ -402,7 +402,7 @@ grub_ata_pciinit (int bus, int device, int func,
static int controller = 0;
/* Read class. */
addr = grub_pci_make_address (bus, device, func, 2);
addr = grub_pci_make_address (dev, 2);
class = grub_pci_read (addr);
/* Check if this class ID matches that of a PCI IDE Controller. */
@ -429,9 +429,9 @@ grub_ata_pciinit (int bus, int device, int func,
{
/* Read the BARs, which either contain a mmapped IO address
or the IO port address. */
addr = grub_pci_make_address (bus, device, func, 4 + 2 * i);
addr = grub_pci_make_address (dev, 4 + 2 * i);
bar1 = grub_pci_read (addr);
addr = grub_pci_make_address (bus, device, func, 5 + 2 * i);
addr = grub_pci_make_address (dev, 5 + 2 * i);
bar2 = grub_pci_read (addr);
/* Check if the BARs describe an IO region. */
@ -444,7 +444,8 @@ grub_ata_pciinit (int bus, int device, int func,
grub_dprintf ("ata",
"PCI dev (%d,%d,%d) compat=%d rega=0x%x regb=0x%x\n",
bus, device, func, compat, rega, regb);
grub_pci_get_bus (dev), grub_pci_get_device (dev),
grub_pci_get_function (dev), compat, rega, regb);
if (rega && regb)
{

View file

@ -169,7 +169,7 @@ grub_biosdisk_open (const char *name, grub_disk_t disk)
else
{
grub_free (data);
return grub_error (GRUB_ERR_BAD_DEVICE, "cannot get C/H/S values");
return grub_error (GRUB_ERR_BAD_DEVICE, "%s cannot get C/H/S values", disk->name);
}
}
@ -252,7 +252,7 @@ grub_biosdisk_rw (int cmd, grub_disk_t disk,
1024 /* cylinders */ *
256 /* heads */ *
63 /* spt */)
return grub_error (GRUB_ERR_OUT_OF_RANGE, "out of disk");
return grub_error (GRUB_ERR_OUT_OF_RANGE, "%s out of disk", disk->name);
soff = ((grub_uint32_t) sector) % data->sectors + 1;
head = ((grub_uint32_t) sector) / data->sectors;
@ -260,7 +260,7 @@ grub_biosdisk_rw (int cmd, grub_disk_t disk,
coff = head / data->heads;
if (coff >= data->cylinders)
return grub_error (GRUB_ERR_OUT_OF_RANGE, "out of disk");
return grub_error (GRUB_ERR_OUT_OF_RANGE, "%s out of disk", disk->name);
if (grub_biosdisk_rw_standard (cmd + 0x02, data->drive,
coff, hoff, soff, size, segment))
@ -268,9 +268,9 @@ grub_biosdisk_rw (int cmd, grub_disk_t disk,
switch (cmd)
{
case GRUB_BIOSDISK_READ:
return grub_error (GRUB_ERR_READ_ERROR, "biosdisk read error");
return grub_error (GRUB_ERR_READ_ERROR, "%s read error", disk->name);
case GRUB_BIOSDISK_WRITE:
return grub_error (GRUB_ERR_WRITE_ERROR, "biosdisk write error");
return grub_error (GRUB_ERR_WRITE_ERROR, "%s write error", disk->name);
}
}
}

View file

@ -107,7 +107,7 @@ grub_ofdisk_iterate (int (*hook) (const char *name))
}
if (! grub_strcmp (alias->type, "block") &&
grub_strcmp (alias->name, "cdrom"))
grub_strncmp (alias->name, "cdrom", 5))
ret = hook (alias->name);
return ret;
}