diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/command.h | 25 | ||||
-rw-r--r-- | include/net.h | 8 |
2 files changed, 8 insertions, 25 deletions
diff --git a/include/command.h b/include/command.h index f103045fd4..a612d65e54 100644 --- a/include/command.h +++ b/include/command.h @@ -42,12 +42,11 @@ extern struct list_head command_list; /* * Monitor Command Table */ - -struct cmd_tbl_s { +struct command { const char *name; /* Command Name */ const char **aliases; /* Implementation function */ - int (*cmd)(struct cmd_tbl_s *, int, char *[]); + int (*cmd)(struct command *, int, char *[]); const char *usage; /* Usage message (short) */ struct list_head list; /* List of commands */ @@ -61,17 +60,14 @@ __attribute__((aligned(64))) #endif ; - -typedef struct cmd_tbl_s cmd_tbl_t; - -extern cmd_tbl_t __barebox_cmd_start; -extern cmd_tbl_t __barebox_cmd_end; +extern struct command __barebox_cmd_start; +extern struct command __barebox_cmd_end; /* common/command.c */ -cmd_tbl_t *find_cmd(const char *cmd); +struct command *find_cmd(const char *cmd); int execute_command(int argc, char **argv); -void barebox_cmd_usage(cmd_tbl_t *cmdtp); +void barebox_cmd_usage(struct command *cmdtp); #define COMMAND_SUCCESS 0 #define COMMAND_ERROR 1 @@ -79,11 +75,6 @@ void barebox_cmd_usage(cmd_tbl_t *cmdtp); #endif /* __ASSEMBLY__ */ -/* - * Configurable monitor commands definitions have been moved - * to include/cmd_confdefs.h - */ - #define __stringify_1(x) #x #define __stringify(x) __stringify_1(x) @@ -91,7 +82,7 @@ void barebox_cmd_usage(cmd_tbl_t *cmdtp); #define Struct_Section __attribute__ ((unused,section (".barebox_cmd"))) #define BAREBOX_CMD_START(_name) \ -const cmd_tbl_t __barebox_cmd_##_name \ +const struct command __barebox_cmd_##_name \ __attribute__ ((unused,section (".barebox_cmd_" __stringify(_name)))) = { \ .name = #_name, @@ -104,6 +95,6 @@ const cmd_tbl_t __barebox_cmd_##_name \ #define BAREBOX_CMD_HELP(text) #endif -int register_command(cmd_tbl_t *); +int register_command(struct command *); #endif /* __COMMAND_H */ diff --git a/include/net.h b/include/net.h index c689a43275..7353c8f501 100644 --- a/include/net.h +++ b/include/net.h @@ -279,10 +279,6 @@ extern uchar NetEtherNullAddr[6]; extern ushort NetOurVLAN; /* Our VLAN */ extern ushort NetOurNativeVLAN; /* Our Native VLAN */ -extern uchar NetCDPAddr[6]; /* Ethernet CDP address */ -extern ushort CDPNativeVLAN; /* CDP returned native VLAN */ -extern ushort CDPApplianceVLAN; /* CDP returned appliance VLAN */ - extern int NetState; /* Network loop state */ /* ---------- Added by sha ------------ */ @@ -301,10 +297,6 @@ extern void ArpRequest (void); typedef enum { BOOTP, RARP, ARP, TFTP, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP } proto_t; -/* when CDP completes these hold the return values */ -extern ushort CDPNativeVLAN; -extern ushort CDPApplianceVLAN; - /* Initialize the network adapter */ int NetLoopInit(proto_t); |