net: translate pxe prefix to tftp when checking for self-load

Commit ba218c1 missed legacy pxe and pxe: prefixes which are
translated to tftp, so comparison failed.
This commit is contained in:
Andrei Borzenkov 2016-05-03 19:23:31 +03:00
parent e045af148a
commit b524fa27f5

View file

@ -1346,6 +1346,15 @@ grub_net_open_real (const char *name)
continue;
}
if (grub_strncmp (prefdev, "pxe", sizeof ("pxe") - 1) == 0 &&
(!prefdev[sizeof ("pxe") - 1] || (prefdev[sizeof("pxe") - 1] == ':')))
{
grub_free (prefdev);
prefdev = grub_strdup ("tftp");
if (!prefdev)
continue;
}
comma = grub_strchr (prefdev, ',');
if (comma)
*comma = '\0';