From: Andrei Borzenkov Date: Tue, 3 May 2016 16:23:31 +0000 (+0300) Subject: net: translate pxe prefix to tftp when checking for self-load X-Git-Tag: 2.02-rc1~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b524fa27f56381bb0efa4944e36f50265113aee5;p=thirdparty%2Fgrub.git 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. --- diff --git a/grub-core/net/net.c b/grub-core/net/net.c index 26a1fc3fc..10773fc34 100644 --- a/grub-core/net/net.c +++ b/grub-core/net/net.c @@ -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';