mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 22:56:25 +08:00
Move program control to thread structure
This commit is contained in:
@@ -114,25 +114,6 @@ static struct afswtch *af_getbyname(const char *name);
|
||||
static struct afswtch *af_getbyfamily(int af);
|
||||
static void af_other_status(int);
|
||||
|
||||
#ifdef __rtems__
|
||||
static int main_ifconfig(int argc, char *argv[]);
|
||||
static int rtems_shell_main_ifconfig(int argc, char *argv[])
|
||||
{
|
||||
rtems_shell_globals_t ifconfig_globals;
|
||||
rtems_shell_globals = &ifconfig_globals;
|
||||
memset (rtems_shell_globals, 0, sizeof (ifconfig_globals));
|
||||
descr = NULL;
|
||||
descrlen = 64;
|
||||
newaddr = 1;
|
||||
supmedia = 0;
|
||||
printkeys = 0;
|
||||
ifconfig_globals.exit_code = 1;
|
||||
if (setjmp (ifconfig_globals.exit_jmp) == 0)
|
||||
return main_ifconfig ( argc, argv);
|
||||
return ifconfig_globals.exit_code;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __rtems__
|
||||
static struct ifconfig_option *opts = NULL;
|
||||
|
||||
@@ -182,12 +163,23 @@ usage(void)
|
||||
}
|
||||
|
||||
#ifdef __rtems__
|
||||
int
|
||||
main_ifconfig(int argc, char *argv[])
|
||||
#else
|
||||
#include <machine/rtems-bsd-program.h>
|
||||
|
||||
static int main(int argc, char *argv[]);
|
||||
|
||||
static int rtems_shell_main_ifconfig(int argc, char *argv[])
|
||||
{
|
||||
descr = NULL;
|
||||
descrlen = 64;
|
||||
newaddr = 1;
|
||||
supmedia = 0;
|
||||
printkeys = 0;
|
||||
|
||||
return rtems_bsd_program_call_main("ifconfig", main, argc, argv);
|
||||
}
|
||||
#endif /* __rtems__ */
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
int c, all, namesonly, downonly, uponly;
|
||||
const struct afswtch *afp = NULL;
|
||||
|
Reference in New Issue
Block a user