2001-10-24 19:00:20 +00:00
|
|
|
/* vi: set sw=4 ts=4: */
|
|
|
|
/*
|
|
|
|
* Mini false implementation for busybox
|
|
|
|
*
|
2004-03-15 08:29:22 +00:00
|
|
|
* Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
|
2001-10-24 19:00:20 +00:00
|
|
|
*
|
2010-08-16 20:14:46 +02:00
|
|
|
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
|
2001-10-24 19:00:20 +00:00
|
|
|
*/
|
2016-11-23 14:46:56 +01:00
|
|
|
//config:config FALSE
|
2017-07-18 22:01:24 +02:00
|
|
|
//config: bool "false (tiny)"
|
2016-11-23 14:46:56 +01:00
|
|
|
//config: default y
|
|
|
|
//config: help
|
2017-07-21 09:50:55 +02:00
|
|
|
//config: false returns an exit code of FALSE (1).
|
2016-11-23 14:46:56 +01:00
|
|
|
|
|
|
|
//applet:IF_FALSE(APPLET_NOFORK(false, false, BB_DIR_BIN, BB_SUID_DROP, false))
|
|
|
|
|
|
|
|
//kbuild:lib-$(CONFIG_FALSE) += false.o
|
2001-10-24 19:00:20 +00:00
|
|
|
|
2003-03-19 09:13:01 +00:00
|
|
|
/* BB_AUDIT SUSv3 compliant */
|
2008-05-23 12:53:18 +00:00
|
|
|
/* http://www.opengroup.org/onlinepubs/000095399/utilities/false.html */
|
2001-10-24 19:00:20 +00:00
|
|
|
|
2015-04-21 16:00:41 +02:00
|
|
|
/* "false --help" is special-cased to ignore --help */
|
|
|
|
//usage:#define false_trivial_usage NOUSAGE_STR
|
|
|
|
//usage:#define false_full_usage ""
|
2011-03-31 14:43:25 +02:00
|
|
|
//usage:#define false_example_usage
|
|
|
|
//usage: "$ false\n"
|
|
|
|
//usage: "$ echo $?\n"
|
|
|
|
//usage: "1\n"
|
|
|
|
|
2007-05-26 19:00:18 +00:00
|
|
|
#include "libbb.h"
|
2001-10-24 19:00:20 +00:00
|
|
|
|
2007-04-10 15:43:37 +00:00
|
|
|
/* This is a NOFORK applet. Be very careful! */
|
|
|
|
|
2007-10-11 10:05:36 +00:00
|
|
|
int false_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
2008-07-05 09:18:54 +00:00
|
|
|
int false_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
2001-10-24 19:00:20 +00:00
|
|
|
{
|
|
|
|
return EXIT_FAILURE;
|
|
|
|
}
|