MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sys_reboot

Function sys_reboot

freebsd/kern/kern_shutdown.c:298–316  ·  view source on GitHub ↗

* The system call that results in a reboot. */ ARGSUSED */

Source from the content-addressed store, hash-verified

296 */
297/* ARGSUSED */
298int
299sys_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
318static void
319shutdown_nice_task_fn(void *arg, int pending __unused)

Callers

nothing calls this directly

Calls 4

mac_system_check_rebootFunction · 0.85
kern_rerootFunction · 0.85
kern_rebootFunction · 0.85
priv_checkFunction · 0.70

Tested by

no test coverage detected