Ai
1 Star 1 Fork 1

Linux OS/busybox

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
reboot.h 737 Bytes
一键复制 编辑 原始数据 按行查看 历史
Denys Vlasenko 提交于 2010-07-26 07:49 +08:00 . *: trailing empty lines removed
/*
* Definitions related to the reboot() system call,
* shared between init.c and halt.c.
*/
#include <sys/reboot.h>
#ifndef RB_HALT_SYSTEM
# if defined(__linux__)
# define RB_HALT_SYSTEM 0xcdef0123
# define RB_ENABLE_CAD 0x89abcdef
# define RB_DISABLE_CAD 0
# define RB_POWER_OFF 0x4321fedc
# define RB_AUTOBOOT 0x01234567
# elif defined(RB_HALT)
# define RB_HALT_SYSTEM RB_HALT
# endif
#endif
/* Stop system and switch power off if possible. */
#ifndef RB_POWER_OFF
# if defined(RB_POWERDOWN)
# define RB_POWER_OFF RB_POWERDOWN
# elif defined(__linux__)
# define RB_POWER_OFF 0x4321fedc
# else
# warning "poweroff unsupported, using halt as fallback"
# define RB_POWER_OFF RB_HALT_SYSTEM
# endif
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/linux-os/busybox.git
git@gitee.com:linux-os/busybox.git
linux-os
busybox
busybox
master

搜索帮助