merge mainline into net
This commit is contained in:
commit
bd67ad0f70
335 changed files with 22289 additions and 5940 deletions
|
@ -547,7 +547,7 @@ void
|
|||
grub_bootp_init (void)
|
||||
{
|
||||
cmd_bootp = grub_register_command ("net_bootp", grub_cmd_bootp,
|
||||
"[CARD]",
|
||||
N_("[CARD]"),
|
||||
N_("perform a bootp autoconfiguration"));
|
||||
cmd_getdhcp = grub_register_command ("net_get_dhcp_option", grub_cmd_dhcpopt,
|
||||
N_("VAR INTERFACE NUMBER DESCRIPTION"),
|
||||
|
|
|
@ -115,7 +115,7 @@ static struct grub_net_card_driver ofdriver =
|
|||
|
||||
static const struct
|
||||
{
|
||||
char *name;
|
||||
const char *name;
|
||||
int offset;
|
||||
}
|
||||
|
||||
|
|
|
@ -1459,7 +1459,7 @@ grub_net_restore_hw (void)
|
|||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
static void *fini_hnd;
|
||||
static struct grub_preboot *fini_hnd;
|
||||
|
||||
static grub_command_t cmd_addaddr, cmd_deladdr, cmd_addroute, cmd_delroute;
|
||||
static grub_command_t cmd_lsroutes, cmd_lscards;
|
||||
|
@ -1468,7 +1468,7 @@ static grub_command_t cmd_lsaddr, cmd_slaac;
|
|||
GRUB_MOD_INIT(net)
|
||||
{
|
||||
cmd_addaddr = grub_register_command ("net_add_addr", grub_cmd_addaddr,
|
||||
"SHORTNAME CARD ADDRESS [HWADDRESS]",
|
||||
N_("SHORTNAME CARD ADDRESS [HWADDRESS]"),
|
||||
N_("Add a network address."));
|
||||
cmd_slaac = grub_register_command ("net_ipv6_autoconf",
|
||||
grub_cmd_ipv6_autoconf,
|
||||
|
@ -1476,13 +1476,13 @@ GRUB_MOD_INIT(net)
|
|||
N_("Perform an IPV6 autoconfiguration"));
|
||||
|
||||
cmd_deladdr = grub_register_command ("net_del_addr", grub_cmd_deladdr,
|
||||
"SHORTNAME",
|
||||
N_("SHORTNAME"),
|
||||
N_("Delete a network address."));
|
||||
cmd_addroute = grub_register_command ("net_add_route", grub_cmd_addroute,
|
||||
"SHORTNAME NET [INTERFACE| gw GATEWAY]",
|
||||
N_("SHORTNAME NET [INTERFACE| gw GATEWAY]"),
|
||||
N_("Add a network route."));
|
||||
cmd_delroute = grub_register_command ("net_del_route", grub_cmd_delroute,
|
||||
"SHORTNAME",
|
||||
N_("SHORTNAME"),
|
||||
N_("Delete a network route."));
|
||||
cmd_lsroutes = grub_register_command ("net_ls_routes", grub_cmd_listroutes,
|
||||
"", N_("list network routes"));
|
||||
|
|
|
@ -77,6 +77,8 @@ grub_netbuff_alloc (grub_size_t len)
|
|||
struct grub_net_buff *nb;
|
||||
void *data;
|
||||
|
||||
COMPILE_TIME_ASSERT (NETBUFF_ALIGN % sizeof (grub_properly_aligned_t) == 0);
|
||||
|
||||
if (len < NETBUFFMINLEN)
|
||||
len = NETBUFFMINLEN;
|
||||
|
||||
|
@ -84,7 +86,8 @@ grub_netbuff_alloc (grub_size_t len)
|
|||
data = grub_memalign (NETBUFF_ALIGN, len + sizeof (*nb));
|
||||
if (!data)
|
||||
return NULL;
|
||||
nb = (struct grub_net_buff *) ((grub_uint8_t *) data + len);
|
||||
nb = (struct grub_net_buff *) ((grub_properly_aligned_t *) data
|
||||
+ len / sizeof (grub_properly_aligned_t));
|
||||
nb->head = nb->data = nb->tail = data;
|
||||
nb->end = (grub_uint8_t *) nb;
|
||||
return nb;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue