2001-10-24 19:00:20 +00:00
|
|
|
/* vi: set sw=4 ts=4: */
|
|
|
|
/*
|
|
|
|
* Mini true 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 TRUE
|
2017-07-18 22:01:24 +02:00
|
|
|
//config: bool "true (tiny)"
|
2016-11-23 14:46:56 +01:00
|
|
|
//config: default y
|
|
|
|
//config: help
|
2017-07-21 09:50:55 +02:00
|
|
|
//config: true returns an exit code of TRUE (0).
|
2016-11-23 14:46:56 +01:00
|
|
|
|
|
|
|
//applet:IF_TRUE(APPLET_NOFORK(true, true, BB_DIR_BIN, BB_SUID_DROP, true))
|
|
|
|
|
|
|
|
//kbuild:lib-$(CONFIG_TRUE) += true.o
|
2001-10-24 19:00:20 +00:00
|
|
|
|
2003-03-19 09:13:01 +00:00
|
|
|
/* BB_AUDIT SUSv3 compliant */
|
|
|
|
/* http://www.opengroup.org/onlinepubs/007904975/utilities/true.html */
|
2001-10-24 19:00:20 +00:00
|
|
|
|
2015-04-21 16:00:41 +02:00
|
|
|
/* "true --help" is special-cased to ignore --help */
|
|
|
|
//usage:#define true_trivial_usage NOUSAGE_STR
|
|
|
|
//usage:#define true_full_usage ""
|
2011-03-31 14:43:25 +02:00
|
|
|
//usage:#define true_example_usage
|
|
|
|
//usage: "$ true\n"
|
|
|
|
//usage: "$ echo $?\n"
|
|
|
|
//usage: "0\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 true_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
2008-07-05 09:18:54 +00:00
|
|
|
int true_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
2001-10-24 19:00:20 +00:00
|
|
|
{
|
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|