函数逻辑报告 | 
Source Code:kernel\reboot.c | 
Create Date:2022-07-27 10:33:37 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:Reboot system call: for obvious reasons only root may call it,* and even root needs to set up some magic numbers in the registers* so that some mistake won't make this reboot the whole machine.* You can also set the meaning of the ctrl-alt-del-key here.
函数原型:SYSCALL_DEFINE4(reboot, int, magic1, int, magic2, unsigned int, cmd, void __user *, arg)
返回类型:
参数:无
| 315 | ret等于0 | 
| 318 | 如果非ns_capable(user_ns, Allow use of reboot() )则返回:负EPERM | 
| 322 | 如果magic1不等于Magic values required to use _reboot() system call.或magic2不等于LINUX_REBOOT_MAGIC2且magic2不等于LINUX_REBOOT_MAGIC2A且magic2不等于LINUX_REBOOT_MAGIC2B且magic2不等于LINUX_REBOOT_MAGIC2C则返回:负EINVAL | 
| 334 | ret等于reboot_pid_ns(pid_ns, cmd) | 
| 344 | mutex_lock( & system_transition_mutex) | 
| 348 | 退出 | 
| 350 | 当:cmd恒等于LINUX_REBOOT_CMD_CAD_ON | 
| 354 | 当:cmd恒等于LINUX_REBOOT_CMD_CAD_OFF | 
| 358 | 当:cmd恒等于LINUX_REBOOT_CMD_HALT | 
| 360 | do_exit(0) | 
| 363 | 当:cmd恒等于LINUX_REBOOT_CMD_POWER_OFF | 
| 364 | kernel_power_off - power_off the system* Shutdown everything and perform a clean system power_off. | 
| 365 | do_exit(0) | 
| 366 | 退出 | 
| 368 | 当:cmd恒等于LINUX_REBOOT_CMD_RESTART2 | 
| 380 | 当:cmd恒等于LINUX_REBOOT_CMD_KEXEC | 
| 381 | ret等于Move into place and start executing a preloaded standalone* executable. If nothing was preloaded return an error. | 
| 382 | 退出 | 
| 391 | 默认 | 
| 395 | mutex_unlock( & system_transition_mutex) | 
| 396 | 返回:ret | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |