2008-08-28 Robert Millan <rmh@aybabtu.com>
Change find_grub_drive() syntax so it doesn't prevent it from detecting NULL names as errors. * util/biosdisk.c (find_grub_drive): Move free slot search code from here ... (find_free_slot): ... to here. (read_device_map): Use find_free_slot() to search for free slots.
This commit is contained in:
parent
965c75ca69
commit
678e849cd3
2 changed files with 21 additions and 7 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2008-08-28 Robert Millan <rmh@aybabtu.com>
|
||||||
|
|
||||||
|
Change find_grub_drive() syntax so it doesn't prevent it from
|
||||||
|
detecting NULL names as errors.
|
||||||
|
|
||||||
|
* util/biosdisk.c (find_grub_drive): Move free slot search code
|
||||||
|
from here ...
|
||||||
|
(find_free_slot): ... to here.
|
||||||
|
(read_device_map): Use find_free_slot() to search for free slots.
|
||||||
|
|
||||||
2008-08-27 Marco Gerards <marco@gnu.org>
|
2008-08-27 Marco Gerards <marco@gnu.org>
|
||||||
|
|
||||||
* conf/common.rmk (pkglib_MODULES): Add scsi.mod.
|
* conf/common.rmk (pkglib_MODULES): Add scsi.mod.
|
||||||
|
|
|
@ -120,12 +120,16 @@ find_grub_drive (const char *name)
|
||||||
if (map[i].drive && ! strcmp (map[i].drive, name))
|
if (map[i].drive && ! strcmp (map[i].drive, name))
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
return -1;
|
||||||
for (i = 0; i < sizeof (map) / sizeof (map[0]); i++)
|
}
|
||||||
if (! map[i].drive)
|
|
||||||
return i;
|
static int
|
||||||
}
|
find_free_slot ()
|
||||||
|
{
|
||||||
|
for (i = 0; i < sizeof (map) / sizeof (map[0]); i++)
|
||||||
|
if (! map[i].drive)
|
||||||
|
return i;
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -503,7 +507,7 @@ read_device_map (const char *dev_map)
|
||||||
|
|
||||||
p++;
|
p++;
|
||||||
/* Find a free slot. */
|
/* Find a free slot. */
|
||||||
drive = find_grub_drive (NULL);
|
drive = find_free_slot ();
|
||||||
if (drive < 0)
|
if (drive < 0)
|
||||||
show_error ("Map table size exceeded");
|
show_error ("Map table size exceeded");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue