* grub-core/net/bootp.c (grub_cmd_bootp): Check if there is any card
present. * include/grub/err.h (grub_err_t): New enum value GRUB_ERR_NET_NO_CARD.
This commit is contained in:
parent
709ad61b07
commit
a9c0b699c0
3 changed files with 10 additions and 0 deletions
|
@ -447,6 +447,9 @@ grub_cmd_bootp (struct grub_command *cmd __attribute__ ((unused)),
|
|||
ncards++;
|
||||
}
|
||||
|
||||
if (ncards == 0)
|
||||
return grub_error (GRUB_ERR_NET_NO_CARD, N_("no network card found"));
|
||||
|
||||
ifaces = grub_zalloc (ncards * sizeof (ifaces[0]));
|
||||
if (!ifaces)
|
||||
return grub_errno;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue