From 495442ed025eb218077a5d86777894ffefe46c48 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 31 Mar 2010 22:03:48 +0200 Subject: [PATCH] * kern/device.c (grub_device_iterate): Clear errors after failed opening device. --- ChangeLog | 5 +++++ kern/device.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d05dd5a7d..d35e1ca22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-31 Vladimir Serbinenko + + * kern/device.c (grub_device_iterate): Clear errors after failed + opening device. + 2010-03-31 Vladimir Serbinenko * kern/ieee1275/openfw.c (grub_children_iterate): Skip device itself if diff --git a/kern/device.c b/kern/device.c index cd019fdaf..4273fedfe 100644 --- a/kern/device.c +++ b/kern/device.c @@ -98,7 +98,10 @@ grub_device_iterate (int (*hook) (const char *name)) dev = grub_device_open (disk_name); if (! dev) - return 0; + { + grub_errno = GRUB_ERR_NONE; + return 0; + } if (dev->disk && dev->disk->has_partitions) {