2002-05-20 Yoshinori K. Okuji <okuji@enbug.org>

* lib/device.c (read_device_map): Show an error message and exit
	abnormally, if MAP[DRIVE] has already been filled.
	* util/grub-install.in: If there is any dulicated entry, print
	an error message and exit abnormally.
This commit is contained in:
okuji committed 2002-05-20 11:48:03 +00:00
1 parent 2364cf3673
commit 58703b663c
3 files changed
+22

No files matched your search

+7
View File
@@ -454,6 +454,13 @@ read_device_map (FILE *fp, char **map, const char *map_file)
while (*eptr && ! isspace (*eptr))
eptr++;
*eptr = 0;
/* Multiple entries for a given drive is not allowed. */
if (map[drive])
{
show_error (line_number, "Duplicated entry found");
return 0;
}
map[drive] = strdup (ptr);
assert (map[drive]);