mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
stubdom/grub: update init_netfront() call for mini-os
This patch updates the call of init_netfront() function according to its recently updated declaration which can also include parameters for gateway and netmask addresses. While we are here, the patch also removes passing the ip parameter because (a) it is not used anywhere and (b) it wastes memory since it would reference a dynamically allocated string. Reported-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
1 parent
0de9cbf9cf
commit
8d990807ec
1 file changed
+1
-3
@@ -291,8 +291,6 @@ struct netfront_dev *net_dev;
|
|||||||
int
|
int
|
||||||
minios_probe (struct nic *nic)
|
minios_probe (struct nic *nic)
|
||||||
{
|
{
|
||||||
char *ip;
|
|
||||||
|
|
||||||
if (net_dev)
|
if (net_dev)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
@@ -300,7 +298,7 @@ minios_probe (struct nic *nic)
|
|||||||
grub_memset ((char *) arptable, 0,
|
grub_memset ((char *) arptable, 0,
|
||||||
MAX_ARP * sizeof (struct arptable_t));
|
MAX_ARP * sizeof (struct arptable_t));
|
||||||
|
|
||||||
net_dev = init_netfront(NULL, (void*) -1, nic->node_addr, &ip);
|
net_dev = init_netfront(NULL, (void*) -1, nic->node_addr, NULL, NULL, NULL);
|
||||||
if (!net_dev)
|
if (!net_dev)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||