diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2012-10-12 13:41:01 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2012-10-12 13:41:01 -0500 |
commit | 81d9b34598fe705a6c64bc112222b30091538343 (patch) | |
tree | 752ed8b46ee602475d43a11dbe122da338227f12 /freebsd-userspace/commands/sbin/route/route.c | |
parent | Add ifconfig command as RTEMS Shell command (diff) | |
download | rtems-libbsd-81d9b34598fe705a6c64bc112222b30091538343.tar.bz2 |
Resolve more conflicts
Diffstat (limited to '')
-rw-r--r-- | freebsd-userspace/commands/sbin/route/route.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/freebsd-userspace/commands/sbin/route/route.c b/freebsd-userspace/commands/sbin/route/route.c index 06bb5025..d3f20bc1 100644 --- a/freebsd-userspace/commands/sbin/route/route.c +++ b/freebsd-userspace/commands/sbin/route/route.c @@ -1,3 +1,7 @@ +#ifdef __rtems__ +#define __need_getopt_newlib +#include <getopt.h> +#endif /* * Copyright (c) 1983, 1989, 1991, 1993 * The Regents of the University of California. All rights reserved. @@ -142,11 +146,19 @@ main(argc, argv) char **argv; { int ch; +#ifdef __rtems__ + struct getopt_data getopt_reent; +#endif if (argc < 2) usage((char *)NULL); +#ifdef __rtems__ + memset(&getopt_reent, 0, sizeof(getopt_data)); + while ((ch = getopt_r(argc, argv, "nqdtv", &getopt_reent)) != -1) +#else while ((ch = getopt(argc, argv, "nqdtv")) != -1) +#endif switch(ch) { case 'n': nflag = 1; @@ -1683,3 +1695,16 @@ 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 */ + main_route, /* command */ + NULL, /* alias */ + NULL /* next */ + }; +#endif |