[rtems-libbsd commit] DHCPCD(8): Add RTEMS program support

Sebastian Huber sebh at rtems.org
Thu Jan 30 15:35:14 UTC 2014


Module:    rtems-libbsd
Branch:    master
Commit:    61d281e39d43b05a24c534256620337f22bbd406
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=61d281e39d43b05a24c534256620337f22bbd406

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Dec 17 14:05:00 2013 +0100

DHCPCD(8): Add RTEMS program support

---

 dhcpcd/dhcpcd.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/dhcpcd/dhcpcd.c b/dhcpcd/dhcpcd.c
index 70210f1..492ad97 100644
--- a/dhcpcd/dhcpcd.c
+++ b/dhcpcd/dhcpcd.c
@@ -1092,6 +1092,24 @@ signal_init(void (*func)(int, siginfo_t *, void *), sigset_t *oldset)
 	return 0;
 }
 
+#ifdef __rtems__
+#include <rtems/libio.h>
+
+static int
+main(int argc, char **argv);
+
+int rtems_bsd_command_dhcpcd(int argc, char **argv)
+{
+	int exit_code;
+
+	rtems_mkdir(DBDIR, S_IRWXU | S_IRWXG | S_IRWXO);
+
+	exit_code = rtems_bsd_program_call_main("dhcpcd", main, argc, argv);
+
+	return exit_code;
+}
+#endif /* __rtems__ */
+
 int
 main(int argc, char **argv)
 {




More information about the vc mailing list