* The system call that results in a reboot. */ ARGSUSED */
| 296 | */ |
| 297 | /* ARGSUSED */ |
| 298 | int |
| 299 | sys_reboot(struct thread *td, struct reboot_args *uap) |
| 300 | { |
| 301 | int error; |
| 302 | |
| 303 | error = 0; |
| 304 | #ifdef MAC |
| 305 | error = mac_system_check_reboot(td->td_ucred, uap->opt); |
| 306 | #endif |
| 307 | if (error == 0) |
| 308 | error = priv_check(td, PRIV_REBOOT); |
| 309 | if (error == 0) { |
| 310 | if (uap->opt & RB_REROOT) |
| 311 | error = kern_reroot(); |
| 312 | else |
| 313 | kern_reboot(uap->opt); |
| 314 | } |
| 315 | return (error); |
| 316 | } |
| 317 | |
| 318 | static void |
| 319 | shutdown_nice_task_fn(void *arg, int pending __unused) |
nothing calls this directly
no test coverage detected