* grub-core/net/net.c (grub_net_open_real): Autoload network modules.
This commit is contained in:
parent
8200fa1597
commit
0ef7478b5b
2 changed files with 46 additions and 20 deletions
|
@ -1,3 +1,7 @@
|
|||
2013-05-10 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/net/net.c (grub_net_open_real): Autoload network modules.
|
||||
|
||||
2013-05-10 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/term/terminfo.c: Rename ANSI_C0 to ANSI_CSI to avoid
|
||||
|
|
|
@ -1243,6 +1243,7 @@ grub_net_open_real (const char *name)
|
|||
grub_net_app_level_t proto;
|
||||
const char *protname, *server;
|
||||
grub_size_t protnamelen;
|
||||
int try;
|
||||
|
||||
if (grub_strncmp (name, "pxe:", sizeof ("pxe:") - 1) == 0)
|
||||
{
|
||||
|
@ -1280,6 +1281,8 @@ grub_net_open_real (const char *name)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
for (try = 0; try < 2; try++)
|
||||
{
|
||||
FOR_NET_APP_LEVEL (proto)
|
||||
{
|
||||
if (grub_memcmp (proto->name, protname, protnamelen) == 0
|
||||
|
@ -1306,6 +1309,25 @@ grub_net_open_real (const char *name)
|
|||
return ret;
|
||||
}
|
||||
}
|
||||
if (try == 0)
|
||||
{
|
||||
if (sizeof ("http") - 1 == protnamelen
|
||||
&& grub_memcmp ("http", protname, protnamelen) == 0)
|
||||
{
|
||||
grub_dl_load ("http");
|
||||
grub_errno = GRUB_ERR_NONE;
|
||||
continue;
|
||||
}
|
||||
if (sizeof ("tftp") - 1 == protnamelen
|
||||
&& grub_memcmp ("tftp", protname, protnamelen) == 0)
|
||||
{
|
||||
grub_dl_load ("tftp");
|
||||
grub_errno = GRUB_ERR_NONE;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
/* Restore original error. */
|
||||
grub_error (GRUB_ERR_UNKNOWN_DEVICE, N_("disk `%s' not found"),
|
||||
|
|
Loading…
Reference in a new issue