2 Unix SMB/CIFS implementation.
3 Critical Fault handling
4 Copyright (C) Andrew Tridgell 1992-1998
5 Copyright (C) Tim Prouty 2009
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef _SAMBA_FAULT_H_
22 #define _SAMBA_FAULT_H_
24 #include <sys/types.h>
36 #define SMB_ASSERT(b) \
39 DEBUG(0,("PANIC: assert failed at %s(%d): %s\n", \
40 __FILE__, __LINE__, #b)); \
41 smb_panic("assert failed: " #b); \
44 #endif /* _SAMBA_DEBUG_H */
46 extern const char *panic_action
;
49 Something really nasty happened - panic !
51 typedef void (*smb_panic_handler_t
)(const char *why
);
53 void fault_configure(smb_panic_handler_t panic_handler
);
54 void fault_setup(void);
55 void fault_setup_disable(void);
56 _NORETURN_
void smb_panic(const char *reason
);
59 #endif /* _SAMBA_FAULT_H_ */