2008-09-22 Bean <bean123ch@gmail.com>

* disk/ata.c (grub_apapi_open): Initialize devfnd, no need to set
	scsi->name and scsi->luns, as they will be set in grub_scsi_open.

	* disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
	error occurs, as grub_disk_open will call grub_disk_close, which will
	call p->close (scsi).
This commit is contained in:
bean 2008-09-22 03:49:26 +00:00
parent 46e04eb9ad
commit c40fd116ea
3 changed files with 10 additions and 7 deletions

View file

@ -891,7 +891,7 @@ static grub_err_t
grub_atapi_open (const char *name, struct grub_scsi *scsi)
{
struct grub_ata_device *dev;
struct grub_ata_device *devfnd;
struct grub_ata_device *devfnd = 0;
for (dev = grub_ata_devices; dev; dev = dev->next)
{
@ -911,8 +911,6 @@ grub_atapi_open (const char *name, struct grub_scsi *scsi)
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "No such ATAPI device");
scsi->data = devfnd;
scsi->name = grub_strdup (name);
scsi->luns = 1;
return GRUB_ERR_NONE;
}