mirror of https://github.com/mkerrisk/man-pages
kexec_load.2: Tweaks to Vivek Goyal's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
7ca024693a
commit
89a2edf198
|
@ -127,38 +127,39 @@ is copied from the calling process into previously reserved memory.
|
||||||
The
|
The
|
||||||
.BR kexec_file_load ()
|
.BR kexec_file_load ()
|
||||||
system call is similar to
|
system call is similar to
|
||||||
.BR kexec_load(),
|
.BR kexec_load (),
|
||||||
but it takes a different set of arguments. It reads kernel to be loaded from
|
but it takes a different set of arguments.
|
||||||
file descriptor
|
It reads the kernel to be loaded from the file referred to by the descriptor
|
||||||
.IR kernel_fd
|
.IR kernel_fd ,
|
||||||
and initrd to be loaded from file descriptor
|
and the initrd to be loaded from file referred to by the descriptor
|
||||||
.IR initrd_fd .
|
.IR initrd_fd .
|
||||||
It also takes length of kernel command line in
|
It also takes the length of the kernel command line in
|
||||||
.IR cmdline_len
|
.IR cmdline_len
|
||||||
and pointer to command line in
|
and a pointer to the command line in
|
||||||
.IR cmdline .
|
.IR cmdline .
|
||||||
|
|
||||||
The
|
The
|
||||||
.IR flags
|
.IR flags
|
||||||
argument is a mask which allows control over system call operation. The
|
argument is a bit mask which modifies the behavior of the call.
|
||||||
following values can be specified in
|
The following values can be specified in
|
||||||
.IR flags
|
.IR flags :
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BR KEXEC_FILE_UNLOAD
|
.BR KEXEC_FILE_UNLOAD
|
||||||
Unload currently loaded kernel.
|
Unload the currently loaded kernel.
|
||||||
.TP
|
.TP
|
||||||
.BR KEXEC_FILE_ON_CRASH
|
.BR KEXEC_FILE_ON_CRASH
|
||||||
Load kernel in memory region reserved for crash kernel. This kernel is
|
Load the new kernel in the memory region reserved for the crash kernel.
|
||||||
booted into if currently running kernel crashes.
|
This kernel is booted if the currently running kernel crashes.
|
||||||
.TP
|
.TP
|
||||||
.BR KEXEC_FILE_NO_INITRAMFS
|
.BR KEXEC_FILE_NO_INITRAMFS
|
||||||
Loading initrd/initramfs is optional. Specify this flag if no initramfs
|
Loading initrd/initramfs is optional.
|
||||||
is being loaded. If this flag is set, kernel will ignore the value passed
|
Specify this flag if no initramfs is being loaded.
|
||||||
in
|
If this flag is set, the value passed in
|
||||||
.IR initrd_fd
|
.IR initrd_fd
|
||||||
|
is ignored.
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
On success, these system calls returns 0. On error, \-1 is returned and
|
On success, these system calls returns 0.
|
||||||
|
On error, \-1 is returned and
|
||||||
.I errno
|
.I errno
|
||||||
is set to indicate the error.
|
is set to indicate the error.
|
||||||
.SH ERRORS
|
.SH ERRORS
|
||||||
|
@ -174,13 +175,14 @@ is invalid; or
|
||||||
is too large
|
is too large
|
||||||
.\" KEXEC_SEGMENT_MAX == 16
|
.\" KEXEC_SEGMENT_MAX == 16
|
||||||
.TP
|
.TP
|
||||||
|
.B ENOEXEC
|
||||||
|
.I kernel_fd
|
||||||
|
does not refer to an open file, or the kernel can't load this file.
|
||||||
|
.TP
|
||||||
.B EPERM
|
.B EPERM
|
||||||
The caller does not have the
|
The caller does not have the
|
||||||
.BR CAP_SYS_BOOT
|
.BR CAP_SYS_BOOT
|
||||||
capability.
|
capability.
|
||||||
.TP
|
|
||||||
.B ENOEXEC
|
|
||||||
kernel_fd does not refer to an open file. Or kernel can't load this file.
|
|
||||||
.SH VERSIONS
|
.SH VERSIONS
|
||||||
The
|
The
|
||||||
.BR kexec_load ()
|
.BR kexec_load ()
|
||||||
|
@ -188,9 +190,8 @@ system call first appeared in Linux 2.6.13.
|
||||||
.SH CONFORMING TO
|
.SH CONFORMING TO
|
||||||
This system call is Linux-specific.
|
This system call is Linux-specific.
|
||||||
.SH NOTES
|
.SH NOTES
|
||||||
Currently, there is no glibc support for
|
Currently, there is no glibc support for these system calls.
|
||||||
.BR kexec_load ().
|
Call them using
|
||||||
Call it using
|
|
||||||
.BR syscall (2).
|
.BR syscall (2).
|
||||||
.PP
|
.PP
|
||||||
The required constants are in the Linux kernel source file
|
The required constants are in the Linux kernel source file
|
||||||
|
|
Loading…
Reference in New Issue