[1933] 2008-11-29 Robert Millan <[email protected]>

Robert Millan <[email protected]>
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 1933
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=1933
Author:   robertmh
Date:     2008-11-29 21:05:59 +0000 (Sat, 29 Nov 2008)

Log Message:
-----------
2008-11-29  Robert Millan  <[email protected]>

        * disk/ata.c (grub_ata_pciinit): Handle errors rised by
        grub_ata_device_initialize() calls.

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

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2008-11-28 20:10:36 UTC (rev 1932)
+++ trunk/grub2/ChangeLog	2008-11-29 21:05:59 UTC (rev 1933)
@@ -1,3 +1,8 @@
+2008-11-29  Robert Millan  <[email protected]>
+
+	* disk/ata.c (grub_ata_pciinit): Handle errors rised by
+	grub_ata_device_initialize() calls.
+
 2008-11-28  Krzysztof Smiechowicz <[email protected]>
 
 	* fs/affs.c (grub_affs_iterate_dir): Return failure when directory

Modified: trunk/grub2/disk/ata.c
===================================================================
--- trunk/grub2/disk/ata.c	2008-11-28 20:10:36 UTC (rev 1932)
+++ trunk/grub2/disk/ata.c	2008-11-29 21:05:59 UTC (rev 1933)
@@ -541,7 +541,25 @@
       if (rega && regb)
 	{
 	  grub_ata_device_initialize (controller * 2 + i, 0, rega, regb);
+
+	  /* Most errors rised by grub_ata_device_initialize() are harmless.
+	     They just indicate this particular drive is not responding, most
+	     likely because it doesn't exist.  We might want to ignore specific
+	     error types here, instead of printing them.  */
+	  if (grub_errno)
+	    {
+	      grub_print_error ();
+	      grub_errno = GRUB_ERR_NONE;
+	    }
+
 	  grub_ata_device_initialize (controller * 2 + i, 1, rega, regb);
+
+	  /* Likewise.  */
+	  if (grub_errno)
+	    {
+	      grub_print_error ();
+	      grub_errno = GRUB_ERR_NONE;
+	    }
 	}
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.