Remove some dead code
This commit is contained in:
parent
760a7e5aed
commit
ce3a2ec025
13 changed files with 3 additions and 164 deletions
|
@ -1438,7 +1438,6 @@ module = {
|
|||
common = net/udp.c;
|
||||
common = net/ethernet.c;
|
||||
common = net/arp.c;
|
||||
common = net/interface.c;
|
||||
common = net/netbuff.c;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <grub/net/arp.h>
|
||||
#include <grub/net/netbuff.h>
|
||||
#include <grub/net/interface.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/net.h>
|
||||
#include <grub/net/ethernet.h>
|
||||
|
@ -92,7 +91,7 @@ grub_net_arp_resolve(struct grub_net_network_level_interface *inf,
|
|||
return GRUB_ERR_NONE;
|
||||
}
|
||||
current_time = grub_get_time_ms();
|
||||
if (current_time - start_time > TIMEOUT_TIME_MS)
|
||||
if (current_time - start_time > 3000)
|
||||
break;
|
||||
} while (! entry);
|
||||
grub_netbuff_clear(nb);
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include <grub/net/ip.h>
|
||||
#include <grub/net/arp.h>
|
||||
#include <grub/net/netbuff.h>
|
||||
#include <grub/net/interface.h>
|
||||
#include <grub/net.h>
|
||||
#include <grub/time.h>
|
||||
#include <grub/net/arp.h>
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
/*#include <grub/net/interface.h>
|
||||
|
||||
#define INTERFACE_REGISTER_FUNCTIONS(layerprevious,layernext) \
|
||||
struct grub_net_##layername_layer_protocol *grub_net_##layername_layer_protocols;\
|
||||
\
|
||||
void grub_net_##layerprevious_##layernext_interface_register (struct grub_net_##layername_layer_protocol *prot)\
|
||||
{\
|
||||
grub_list_push (GRUB_AS_LIST_P (&grub_net_##layername_layer_protocols),\
|
||||
GRUB_AS_LIST (prot));\
|
||||
}\
|
||||
\
|
||||
void grub_net_##layerprevious_##layernext_interface_unregister (struct grub_net_##layername_layer_protocol *prot);\
|
||||
{\
|
||||
grub_list_remove (GRUB_AS_LIST_P (&grub_net_##layername_layer_protocols),\
|
||||
GRUB_AS_LIST (prot));\
|
||||
}\
|
||||
|
||||
INTERFACE_REGISTER_FUNCTIONS("application","transport");
|
||||
INTERFACE_REGISTER_FUNCTIONS("transport","network");
|
||||
INTERFACE_REGISTER_FUNCTIONS("network","link");
|
||||
INTERFACE_REGISTER_FUNCTIONS("link");*/
|
||||
|
||||
#include <grub/mm.h>
|
||||
#include <grub/net/interface.h>
|
||||
struct grub_net_protocol_stack
|
||||
*grub_net_protocol_stack_get (char *name)
|
||||
{
|
||||
struct grub_net_protocol_stack *p;
|
||||
|
||||
for (p = grub_net_protocol_stacks; p; p = p->next)
|
||||
{
|
||||
if (!grub_strcmp(p->name,name))
|
||||
return p;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
|
@ -2,8 +2,6 @@
|
|||
#include <grub/misc.h>
|
||||
#include <grub/net/arp.h>
|
||||
#include <grub/net/ethernet.h>
|
||||
#include <grub/net/interface.h>
|
||||
#include <grub/net/type_net.h>
|
||||
#include <grub/net.h>
|
||||
#include <grub/net/netbuff.h>
|
||||
#include <grub/mm.h>
|
||||
|
|
|
@ -73,7 +73,7 @@ struct grub_net_buff *grub_netbuff_alloc ( grub_size_t len )
|
|||
|
||||
len = ALIGN_UP (len,NETBUFF_ALIGN);
|
||||
data = grub_memalign (NETBUFF_ALIGN, len + sizeof (*nb));
|
||||
nb = (struct grub_net_buff *) ((int)data + len);
|
||||
nb = (struct grub_net_buff *) ((grub_uint8_t *) data + len);
|
||||
nb->head = nb->data = nb->tail = data;
|
||||
nb->end = (char *) nb;
|
||||
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
#include <grub/net/ip.h>
|
||||
#include <grub/net/ethernet.h>
|
||||
#include <grub/net/netbuff.h>
|
||||
#include <grub/net/interface.h>
|
||||
#include <grub/net/type_net.h>
|
||||
#include <grub/net.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/dl.h>
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
#include <grub/net.h>
|
||||
#include <grub/net/udp.h>
|
||||
#include <grub/net/ip.h>
|
||||
#include <grub/net/type_net.h>
|
||||
#include <grub/net/netbuff.h>
|
||||
#include <grub/net/protocol.h>
|
||||
#include <grub/net/interface.h>
|
||||
#include <grub/time.h>
|
||||
|
||||
grub_err_t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue