Denis Vlasenko | 0edbdd8 | 2008-04-01 17:43:03 +0000 | [diff] [blame] | 1 | /* vi: set sw=4 ts=4: */ |
| 2 | /* |
| 3 | * Utility routines. |
| 4 | * |
| 5 | * Copyright (C) 2008 by Denys Vlasenko <vda.linux@googlemail.com> |
| 6 | * |
Denys Vlasenko | 0ef64bd | 2010-08-16 20:14:46 +0200 | [diff] [blame] | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
Denis Vlasenko | 0edbdd8 | 2008-04-01 17:43:03 +0000 | [diff] [blame] | 8 | */ |
Denys Vlasenko | ebe6d9d | 2017-10-05 14:40:24 +0200 | [diff] [blame] | 9 | #include "libbb.h" |
Denis Vlasenko | 0edbdd8 | 2008-04-01 17:43:03 +0000 | [diff] [blame] | 10 | |
Denys Vlasenko | 550bf5b | 2015-10-09 16:42:57 +0200 | [diff] [blame] | 11 | /* Keeping it separate allows to NOT pull in stdio for VERY small applets. |
Denis Vlasenko | 0edbdd8 | 2008-04-01 17:43:03 +0000 | [diff] [blame] | 12 | * Try building busybox with only "true" enabled... */ |
| 13 | |
Denys Vlasenko | 550bf5b | 2015-10-09 16:42:57 +0200 | [diff] [blame] | 14 | void (*die_func)(void); |
Denis Vlasenko | 0edbdd8 | 2008-04-01 17:43:03 +0000 | [diff] [blame] | 15 | |
Denis Vlasenko | defc1ea | 2008-06-27 02:52:20 +0000 | [diff] [blame] | 16 | void FAST_FUNC xfunc_die(void) |
Denis Vlasenko | 0edbdd8 | 2008-04-01 17:43:03 +0000 | [diff] [blame] | 17 | { |
Denys Vlasenko | 550bf5b | 2015-10-09 16:42:57 +0200 | [diff] [blame] | 18 | if (die_func) |
| 19 | die_func(); |
Denis Vlasenko | 0edbdd8 | 2008-04-01 17:43:03 +0000 | [diff] [blame] | 20 | exit(xfunc_error_retval); |
| 21 | } |