Skip to main content

load_and_exec

Function load_and_exec 

Source
pub fn load_and_exec(req: &KexecRequest) -> Result<Infallible, KexecError>
Expand description

Load the requested kernel via kexec_file_load(2) and immediately trigger reboot(LINUX_REBOOT_CMD_KEXEC).

On success this function does not return โ€” the calling process is replaced by the new kernel. Returning Ok with std::convert::Infallible is unreachable in practice; the type signature documents the intent.

ยงErrors

See KexecError โ€” every non-success path is classified so the caller can present a specific diagnostic.