+2008-04-07 Robert Millan <rmh@aybabtu.com>
+
+ * util/biosdisk.c (read_device_map): Skip devices that don't exist
+ (this prevents the presence of a bogus entry from ruining the whole
+ thing).
+
2008-04-06 Pavel Roskin <proski@gnu.org>
* util/biosdisk.c: Include grub/util/biosdisk.h.
FILE *fp;
char buf[1024]; /* XXX */
int lineno = 0;
- auto void show_error (const char *msg);
+ struct stat st;
+ auto void show_error (const char *msg);
void show_error (const char *msg)
{
grub_util_error ("%s:%d: %s", dev_map, lineno, msg);
if (map[drive])
show_error ("Duplicated entry found");
+ if (stat (p, &st) == -1)
+ {
+ grub_util_info ("Cannot stat `%s', skipping", p);
+ continue;
+ }
+
#ifdef __linux__
/* On Linux, the devfs uses symbolic links horribly, and that
confuses the interface very much, so use realpath to expand