1*8021ba67SEmmanuel Vadot /*-
2*8021ba67SEmmanuel Vadot * Copyright (c) 2022 Beckhoff Automation GmbH & Co. KG
3*8021ba67SEmmanuel Vadot *
4*8021ba67SEmmanuel Vadot * Redistribution and use in source and binary forms, with or without
5*8021ba67SEmmanuel Vadot * modification, are permitted provided that the following conditions
6*8021ba67SEmmanuel Vadot * are met:
7*8021ba67SEmmanuel Vadot * 1. Redistributions of source code must retain the above copyright
8*8021ba67SEmmanuel Vadot * notice, this list of conditions and the following disclaimer.
9*8021ba67SEmmanuel Vadot * 2. Redistributions in binary form must reproduce the above copyright
10*8021ba67SEmmanuel Vadot * notice, this list of conditions and the following disclaimer in the
11*8021ba67SEmmanuel Vadot * documentation and/or other materials provided with the distribution.
12*8021ba67SEmmanuel Vadot *
13*8021ba67SEmmanuel Vadot * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14*8021ba67SEmmanuel Vadot * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15*8021ba67SEmmanuel Vadot * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16*8021ba67SEmmanuel Vadot * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17*8021ba67SEmmanuel Vadot * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18*8021ba67SEmmanuel Vadot * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19*8021ba67SEmmanuel Vadot * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20*8021ba67SEmmanuel Vadot * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21*8021ba67SEmmanuel Vadot * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22*8021ba67SEmmanuel Vadot * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23*8021ba67SEmmanuel Vadot * SUCH DAMAGE.
24*8021ba67SEmmanuel Vadot *
25*8021ba67SEmmanuel Vadot */
26*8021ba67SEmmanuel Vadot
27*8021ba67SEmmanuel Vadot #ifndef _LINUXKPI_LINUX_REBOOT_H_
28*8021ba67SEmmanuel Vadot #define _LINUXKPI_LINUX_REBOOT_H_
29*8021ba67SEmmanuel Vadot
30*8021ba67SEmmanuel Vadot #include <sys/reboot.h>
31*8021ba67SEmmanuel Vadot
32*8021ba67SEmmanuel Vadot static inline void
orderly_poweroff(bool force)33*8021ba67SEmmanuel Vadot orderly_poweroff(bool force)
34*8021ba67SEmmanuel Vadot {
35*8021ba67SEmmanuel Vadot
36*8021ba67SEmmanuel Vadot shutdown_nice(RB_POWEROFF);
37*8021ba67SEmmanuel Vadot }
38*8021ba67SEmmanuel Vadot
39*8021ba67SEmmanuel Vadot #endif
40*8021ba67SEmmanuel Vadot
41