* util/getroot.c (find_root_devices_from_poolname): Handle spaces in the

name.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-05-02 09:56:56 +02:00
parent a626fdd76a
commit bcb288ed17
2 changed files with 17 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2012-05-02 Vladimir Serbinenko <phcoder@gmail.com>
* util/getroot.c (find_root_devices_from_poolname): Handle spaces in the
name.
2012-05-01 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/net/ip.c (handle_dgram): Fix undeclared variable.

View File

@ -380,8 +380,18 @@ find_root_devices_from_poolname (char *poolname)
st++;
break;
case 1:
if (!strcmp (name, poolname))
st++;
{
char *ptr = line;
while (1)
{
if (strncmp (ptr, poolname, strlen (poolname)) == 0
&& grub_isspace(ptr[strlen (poolname)]))
st++;
if (!grub_isspace (*ptr))
break;
ptr++;
}
}
break;
case 2:
if (strcmp (name, "mirror") && !sscanf (name, "mirror-%u", &dummy)