Matt Kraai | 258bd3d | 2001-10-24 19:00:20 +0000 | [diff] [blame] | 1 | /* vi: set sw=4 ts=4: */ |
| 2 | /* |
| 3 | * Mini false implementation for busybox |
| 4 | * |
Eric Andersen | c7bda1c | 2004-03-15 08:29:22 +0000 | [diff] [blame] | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
Matt Kraai | 258bd3d | 2001-10-24 19:00:20 +0000 | [diff] [blame] | 6 | * |
Denys Vlasenko | 0ef64bd | 2010-08-16 20:14:46 +0200 | [diff] [blame] | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
Matt Kraai | 258bd3d | 2001-10-24 19:00:20 +0000 | [diff] [blame] | 8 | */ |
Denys Vlasenko | af3f420 | 2016-11-23 14:46:56 +0100 | [diff] [blame] | 9 | //config:config FALSE |
| 10 | //config: bool "false" |
| 11 | //config: default y |
| 12 | //config: help |
| 13 | //config: false returns an exit code of FALSE (1). |
| 14 | |
| 15 | //applet:IF_FALSE(APPLET_NOFORK(false, false, BB_DIR_BIN, BB_SUID_DROP, false)) |
| 16 | |
| 17 | //kbuild:lib-$(CONFIG_FALSE) += false.o |
Matt Kraai | 258bd3d | 2001-10-24 19:00:20 +0000 | [diff] [blame] | 18 | |
Manuel Novoa III | cad5364 | 2003-03-19 09:13:01 +0000 | [diff] [blame] | 19 | /* BB_AUDIT SUSv3 compliant */ |
Bernhard Reutner-Fischer | cf575ca | 2008-05-23 12:53:18 +0000 | [diff] [blame] | 20 | /* http://www.opengroup.org/onlinepubs/000095399/utilities/false.html */ |
Matt Kraai | 258bd3d | 2001-10-24 19:00:20 +0000 | [diff] [blame] | 21 | |
Denys Vlasenko | de5edad | 2015-04-21 16:00:41 +0200 | [diff] [blame] | 22 | /* "false --help" is special-cased to ignore --help */ |
| 23 | //usage:#define false_trivial_usage NOUSAGE_STR |
| 24 | //usage:#define false_full_usage "" |
Pere Orga | 3442538 | 2011-03-31 14:43:25 +0200 | [diff] [blame] | 25 | //usage:#define false_example_usage |
| 26 | //usage: "$ false\n" |
| 27 | //usage: "$ echo $?\n" |
| 28 | //usage: "1\n" |
| 29 | |
Denis Vlasenko | b6adbf1 | 2007-05-26 19:00:18 +0000 | [diff] [blame] | 30 | #include "libbb.h" |
Matt Kraai | 258bd3d | 2001-10-24 19:00:20 +0000 | [diff] [blame] | 31 | |
Denis Vlasenko | 99912ca | 2007-04-10 15:43:37 +0000 | [diff] [blame] | 32 | /* This is a NOFORK applet. Be very careful! */ |
| 33 | |
Denis Vlasenko | 9b49a5e | 2007-10-11 10:05:36 +0000 | [diff] [blame] | 34 | int false_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
Denis Vlasenko | a60f84e | 2008-07-05 09:18:54 +0000 | [diff] [blame] | 35 | int false_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
Matt Kraai | 258bd3d | 2001-10-24 19:00:20 +0000 | [diff] [blame] | 36 | { |
| 37 | return EXIT_FAILURE; |
| 38 | } |