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 | */ |
| 9 | |
Denys Vlasenko | 550bf5b | 2015-10-09 16:42:57 +0200 | [diff] [blame] | 10 | /* 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] | 11 | * Try building busybox with only "true" enabled... */ |
| 12 | |
| 13 | #include "libbb.h" |
| 14 | |
Denys Vlasenko | 550bf5b | 2015-10-09 16:42:57 +0200 | [diff] [blame] | 15 | void (*die_func)(void); |
Denis Vlasenko | 0edbdd8 | 2008-04-01 17:43:03 +0000 | [diff] [blame] | 16 | |
Denis Vlasenko | defc1ea | 2008-06-27 02:52:20 +0000 | [diff] [blame] | 17 | void FAST_FUNC xfunc_die(void) |
Denis Vlasenko | 0edbdd8 | 2008-04-01 17:43:03 +0000 | [diff] [blame] | 18 | { |
Denys Vlasenko | 550bf5b | 2015-10-09 16:42:57 +0200 | [diff] [blame] | 19 | if (die_func) |
| 20 | die_func(); |
Denis Vlasenko | 0edbdd8 | 2008-04-01 17:43:03 +0000 | [diff] [blame] | 21 | exit(xfunc_error_retval); |
| 22 | } |