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