[mirmince commits] {tests} branch master updated. 382a19e4168415c565bcb9921e87352c7e3a0d79
tg at freewrt.org
tg at freewrt.org
Mon Jul 15 20:57:35 UTC 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Supplemental git repository tests for FreeWRT project mirmince".
The branch, master has been updated
via 382a19e4168415c565bcb9921e87352c7e3a0d79 (commit)
from deaf04314e98dfac54b50e949f1d8b315bd63070 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 382a19e4168415c565bcb9921e87352c7e3a0d79
Author: Thorsten Glaser <tg at mirbsd.org>
Date: Mon Jul 15 20:57:18 2013 +0000
add simple environment dumper
-----------------------------------------------------------------------
Summary of changes:
Makefile | 2 ++
env.c | 18 ++++++++++++++++++
2 files changed, 20 insertions(+)
create mode 100644 env.c
diff --git a/Makefile b/Makefile
index 82df359..0c19a7b 100644
--- a/Makefile
+++ b/Makefile
@@ -40,6 +40,8 @@ depend:
PROGS+= hw-unix
CLEANFILES+= hw-unix.out
+PROGS+= env
+
CPPFLAGS:=
CFLAGS:=
AFLAGS:=
diff --git a/env.c b/env.c
new file mode 100644
index 0000000..aac300d
--- /dev/null
+++ b/env.c
@@ -0,0 +1,18 @@
+#include <string.h>
+#include <unistd.h>
+
+extern char **environ;
+
+const char nul[] = "";
+
+int
+main(void)
+{
+ char *cp, **wp = environ;
+
+ if (wp)
+ while ((cp = *wp++))
+ write(1, cp, strlen(cp) + 1);
+ write(1, nul, 1);
+ return (environ ? 0 : 1);
+}
hooks/post-receive
--
Supplemental git repository tests for FreeWRT project mirmince
(FreeWRT project mirmince repository tests)
More information about the mirmince-commits
mailing list