Include -Wunreachable-code when building.
[sysvinit.git] / src / reboot.h
1 /*
2 * reboot.h Headerfile that defines how to handle
3 * the reboot() system call.
4 *
5 * Version: @(#)reboot.h 2.85-17 04-Jun-2004 miquels@cistron.nl
6 *
7 * Copyright (C) (C) 1991-2004 Miquel van Smoorenburg.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24 #include <sys/reboot.h>
25
26 #ifdef RB_ENABLE_CAD
27 # define BMAGIC_HARD RB_ENABLE_CAD
28 #endif
29
30 #ifdef RB_DISABLE_CAD
31 # define BMAGIC_SOFT RB_DISABLE_CAD
32 #endif
33
34 #ifdef RB_HALT_SYSTEM
35 # define BMAGIC_HALT RB_HALT_SYSTEM
36 #else
37 # define BMAGIC_HALT RB_HALT
38 #endif
39
40 #define BMAGIC_REBOOT RB_AUTOBOOT
41
42 #ifdef RB_POWER_OFF
43 # define BMAGIC_POWEROFF RB_POWER_OFF
44 #elif defined(RB_POWEROFF)
45 # define BMAGIC_POWEROFF RB_POWEROFF
46 #else
47 # define BMAGIC_POWEROFF BMAGIC_HALT
48 #endif
49
50 #define init_reboot(magic) reboot(magic)
51