aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/false.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/posix/false.c')
-rw-r--r--toys/posix/false.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/toys/posix/false.c b/toys/posix/false.c
new file mode 100644
index 00000000..7b570bd2
--- /dev/null
+++ b/toys/posix/false.c
@@ -0,0 +1,23 @@
+/* vi: set sw=4 ts=4:
+ *
+ * false.c - Return nonzero.
+ *
+ * Copyright 2007 Rob Landley <rob@landley.net>
+ *
+ * See http://www.opengroup.org/onlinepubs/009695399/utilities/false.html
+
+USE_FALSE(NEWTOY(false, NULL, TOYFLAG_BIN))
+
+config FALSE
+ bool "false"
+ default y
+ help
+ Return nonzero.
+*/
+
+#include "toys.h"
+
+void false_main(void)
+{
+ toys.exitval = 1;
+}