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>
28 /* Please include header file debug.h if you want to use macro SMB_ASSERT */
34 #define SMB_ASSERT(b) \
37 DEBUG(0,("PANIC: assert failed at %s(%d): %s\n", \
38 __FILE__, __LINE__, #b)); \
39 smb_panic("assert failed: " #b); \
42 #endif /* _SAMBA_DEBUG_H */
44 extern const char *panic_action
;
47 Something really nasty happened - panic !
49 typedef void (*smb_panic_handler_t
)(const char *why
);
51 void fault_configure(smb_panic_handler_t panic_handler
);
52 void fault_setup(void);
53 void fault_setup_disable(void);
54 _NORETURN_
void smb_panic(const char *reason
);
57 #endif /* _SAMBA_FAULT_H_ */