mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 07:59:07 +08:00
Move shell items to separate file
This commit is contained in:
@@ -164,10 +164,11 @@ usage(void)
|
||||
|
||||
#ifdef __rtems__
|
||||
#include <machine/rtems-bsd-program.h>
|
||||
#include <machine/rtems-bsd-commands.h>
|
||||
|
||||
static int main(int argc, char *argv[]);
|
||||
|
||||
static int rtems_shell_main_ifconfig(int argc, char *argv[])
|
||||
int rtems_bsd_command_ifconfig(int argc, char *argv[])
|
||||
{
|
||||
descr = NULL;
|
||||
descrlen = 64;
|
||||
@@ -1220,16 +1221,3 @@ ifconfig_ctor(void)
|
||||
cmd_register(&basic_cmds[i]);
|
||||
#undef N
|
||||
}
|
||||
|
||||
#ifdef __rtems__
|
||||
#include <rtems/shell.h>
|
||||
|
||||
rtems_shell_cmd_t rtems_shell_IFCONFIG_Command = {
|
||||
"ifconfig", /* name */
|
||||
"ifconfig [args]", /* usage */
|
||||
"net", /* topic */
|
||||
rtems_shell_main_ifconfig, /* command */
|
||||
NULL, /* alias */
|
||||
NULL /* next */
|
||||
};
|
||||
#endif
|
||||
|
@@ -219,10 +219,11 @@ static void usage(void) __dead2;
|
||||
|
||||
#ifdef __rtems__
|
||||
#include <machine/rtems-bsd-program.h>
|
||||
#include <machine/rtems-bsd-commands.h>
|
||||
|
||||
static int main(int argc, char **argv);
|
||||
|
||||
static int rtems_shell_main_ping(int argc, char *argv[])
|
||||
int rtems_bsd_command_ping(int argc, char *argv[])
|
||||
{
|
||||
BBELL = '\a';
|
||||
BSPACE = '\b';
|
||||
@@ -1769,16 +1770,3 @@ usage()
|
||||
" [-z tos] mcast-group");
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
|
||||
#ifdef __rtems__
|
||||
#include <rtems/shell.h>
|
||||
|
||||
rtems_shell_cmd_t rtems_shell_PING_Command = {
|
||||
"ping", /* name */
|
||||
"ping [args]", /* usage */
|
||||
"net", /* topic */
|
||||
rtems_shell_main_ping, /* command */
|
||||
NULL, /* alias */
|
||||
NULL /* next */
|
||||
};
|
||||
#endif
|
||||
|
@@ -130,10 +130,11 @@ usage(cp)
|
||||
|
||||
#ifdef __rtems__
|
||||
#include <machine/rtems-bsd-program.h>
|
||||
#include <machine/rtems-bsd-commands.h>
|
||||
|
||||
static int main(int argc, char **argv);
|
||||
|
||||
static int rtems_shell_main_route(int argc, char *argv[])
|
||||
int rtems_bsd_command_route(int argc, char *argv[])
|
||||
{
|
||||
return rtems_bsd_program_call_main("route", main, argc, argv);
|
||||
}
|
||||
@@ -1694,16 +1695,3 @@ atalk_ntoa(struct at_addr at)
|
||||
(void) snprintf(buf, sizeof(buf), "%u.%u", ntohs(at.s_net), at.s_node);
|
||||
return(buf);
|
||||
}
|
||||
|
||||
#ifdef __rtems__
|
||||
#include <rtems/shell.h>
|
||||
|
||||
rtems_shell_cmd_t rtems_shell_ROUTE_Command = {
|
||||
"route", /* name */
|
||||
"route [args]", /* usage */
|
||||
"net", /* topic */
|
||||
rtems_shell_main_route, /* command */
|
||||
NULL, /* alias */
|
||||
NULL /* next */
|
||||
};
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user