]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2008-01-08 Robert Millan <rmh@aybabtu.com>
authorrobertmh <robertmh@localhost>
Wed, 9 Jan 2008 23:25:54 +0000 (23:25 +0000)
committerrobertmh <robertmh@localhost>
Wed, 9 Jan 2008 23:25:54 +0000 (23:25 +0000)
        * kern/device.c (grub_device_iterate): Do not abort device iteration
        when one of the devices cannot be opened.
        * kern/disk.c (grub_disk_open): Do not account previous failures of
        unrelated functions when grub_errno is checked for.

ChangeLog
kern/device.c
kern/disk.c

index f7dc6f2d1b9e11fd93d5287e978848ead9a3d73a..4894deb76fe23ea8aa405decfb76988e6decd3c7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-01-08  Robert Millan  <rmh@aybabtu.com>
+
+       * kern/device.c (grub_device_iterate): Do not abort device iteration
+       when one of the devices cannot be opened.
+       * kern/disk.c (grub_disk_open): Do not account previous failures of
+       unrelated functions when grub_errno is checked for.
+
 2008-01-08  Robert Millan  <rmh@aybabtu.com>
 
        * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
index 197ece69ef9fcc8f644ad163ebfd489181dbe3a0..a39fdcecb0a8879df9a5ab4fc9add334e714119f 100644 (file)
@@ -1,7 +1,7 @@
 /* device.c - device manager */
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2002,2005,2007  Free Software Foundation, Inc.
+ *  Copyright (C) 2002,2005,2007,2008  Free Software Foundation, Inc.
  *
  *  GRUB is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -95,7 +95,7 @@ grub_device_iterate (int (*hook) (const char *name))
       
       dev = grub_device_open (disk_name);
       if (! dev)
-       return 1;
+       return 0;
       
       if (dev->disk && dev->disk->has_partitions)
        if (grub_partition_iterate (dev->disk, iterate_partition))
index 9e0f60b077bad3aa7bda4641e8ca02fd12583c1f..e08263e65bfc65cfe8096461dc67d502dbdcd5eb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2002,2003,2004,2006,2007  Free Software Foundation, Inc.
+ *  Copyright (C) 2002,2003,2004,2006,2007,2008  Free Software Foundation, Inc.
  *
  *  GRUB is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -217,6 +217,9 @@ grub_disk_open (const char *name)
   char *raw = (char *) name;
   unsigned long current_time;
 
+  /* Do not account previous failures when grub_errno is checked for.  */
+  grub_errno = GRUB_ERR_NONE;
+
   grub_dprintf ("disk", "Opening `%s'...\n", name);
 
   disk = (grub_disk_t) grub_malloc (sizeof (*disk));