commit-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[1869] 2008-09-22 Bean <address@hidden>


From: Bean
Subject: [1869] 2008-09-22 Bean <address@hidden>
Date: Mon, 22 Sep 2008 03:49:27 +0000

Revision: 1869
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=1869
Author:   bean
Date:     2008-09-22 03:49:26 +0000 (Mon, 22 Sep 2008)

Log Message:
-----------
2008-09-22  Bean  <address@hidden>

        * 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).

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/disk/ata.c
    trunk/grub2/disk/scsi.c

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog       2008-09-21 17:40:13 UTC (rev 1868)
+++ trunk/grub2/ChangeLog       2008-09-22 03:49:26 UTC (rev 1869)
@@ -1,3 +1,12 @@
+2008-09-22  Bean  <address@hidden>
+
+       * 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).
+
 008-09-21  Felix Zielcke  <address@hidden>
 
        * configure.ac (AC_INIT): Quote `GRUB' string and version number.

Modified: trunk/grub2/disk/ata.c
===================================================================
--- trunk/grub2/disk/ata.c      2008-09-21 17:40:13 UTC (rev 1868)
+++ trunk/grub2/disk/ata.c      2008-09-22 03:49:26 UTC (rev 1869)
@@ -891,7 +891,7 @@
 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 @@
     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;
 }

Modified: trunk/grub2/disk/scsi.c
===================================================================
--- trunk/grub2/disk/scsi.c     2008-09-21 17:40:13 UTC (rev 1868)
+++ trunk/grub2/disk/scsi.c     2008-09-22 03:49:26 UTC (rev 1869)
@@ -255,7 +255,6 @@
          scsi->name = grub_strdup (name);
          if (! scsi->name)
            {
-             p->close (scsi);
              return grub_errno;
            }
 
@@ -265,7 +264,6 @@
          if (err)
            {
              grub_dprintf ("scsi", "inquiry failed\n");
-             p->close (scsi);
              return grub_errno;
            }
 
@@ -277,7 +275,6 @@
          if (scsi->devtype != grub_scsi_devtype_direct
              && scsi->devtype != grub_scsi_devtype_cdrom)
            {
-             p->close (scsi);
              return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
                                 "unknown SCSI device");
            }
@@ -291,7 +288,6 @@
          if (err)
            {
              grub_dprintf ("scsi", "READ CAPACITY failed\n");
-             p->close (scsi);
              return grub_errno;
            }
 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]