blob: 73f7998e583f28bb2c70618314f25c5c626d6d41 [file] [log] [blame]
Denis Vlasenko0edbdd82008-04-01 17:43:03 +00001/* vi: set sw=4 ts=4: */
2/*
3 * Utility routines.
4 *
5 * Copyright (C) 2008 by Denys Vlasenko <vda.linux@googlemail.com>
6 *
Denys Vlasenko0ef64bd2010-08-16 20:14:46 +02007 * Licensed under GPLv2, see file LICENSE in this source tree.
Denis Vlasenko0edbdd82008-04-01 17:43:03 +00008 */
9
Denys Vlasenko550bf5b2015-10-09 16:42:57 +020010/* Keeping it separate allows to NOT pull in stdio for VERY small applets.
Denis Vlasenko0edbdd82008-04-01 17:43:03 +000011 * Try building busybox with only "true" enabled... */
12
13#include "libbb.h"
14
Denys Vlasenko550bf5b2015-10-09 16:42:57 +020015void (*die_func)(void);
Denis Vlasenko0edbdd82008-04-01 17:43:03 +000016
Denis Vlasenkodefc1ea2008-06-27 02:52:20 +000017void FAST_FUNC xfunc_die(void)
Denis Vlasenko0edbdd82008-04-01 17:43:03 +000018{
Denys Vlasenko550bf5b2015-10-09 16:42:57 +020019 if (die_func)
20 die_func();
Denis Vlasenko0edbdd82008-04-01 17:43:03 +000021 exit(xfunc_error_retval);
22}