kexec_load.2: Tweaks to Vivek Goyal's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-10-31 14:55:12 +01:00
parent 7ca024693a
commit 89a2edf198
1 changed files with 25 additions and 24 deletions

View File

@ -127,38 +127,39 @@ is copied from the calling process into previously reserved memory.
The
.BR kexec_file_load ()
system call is similar to
.BR kexec_load(),
but it takes a different set of arguments. It reads kernel to be loaded from
file descriptor
.IR kernel_fd
and initrd to be loaded from file descriptor
.BR kexec_load (),
but it takes a different set of arguments.
It reads the kernel to be loaded from the file referred to by the descriptor
.IR kernel_fd ,
and the initrd to be loaded from file referred to by the descriptor
.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
and pointer to command line in
and a pointer to the command line in
.IR cmdline .
The
.IR flags
argument is a mask which allows control over system call operation. The
following values can be specified in
.IR flags
argument is a bit mask which modifies the behavior of the call.
The following values can be specified in
.IR flags :
.TP
.BR KEXEC_FILE_UNLOAD
Unload currently loaded kernel.
Unload the currently loaded kernel.
.TP
.BR KEXEC_FILE_ON_CRASH
Load kernel in memory region reserved for crash kernel. This kernel is
booted into if currently running kernel crashes.
Load the new kernel in the memory region reserved for the crash kernel.
This kernel is booted if the currently running kernel crashes.
.TP
.BR KEXEC_FILE_NO_INITRAMFS
Loading initrd/initramfs is optional. Specify this flag if no initramfs
is being loaded. If this flag is set, kernel will ignore the value passed
in
Loading initrd/initramfs is optional.
Specify this flag if no initramfs is being loaded.
If this flag is set, the value passed in
.IR initrd_fd
is ignored.
.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
is set to indicate the error.
.SH ERRORS
@ -174,13 +175,14 @@ is invalid; or
is too large
.\" KEXEC_SEGMENT_MAX == 16
.TP
.B ENOEXEC
.I kernel_fd
does not refer to an open file, or the kernel can't load this file.
.TP
.B EPERM
The caller does not have the
.BR CAP_SYS_BOOT
capability.
.TP
.B ENOEXEC
kernel_fd does not refer to an open file. Or kernel can't load this file.
.SH VERSIONS
The
.BR kexec_load ()
@ -188,9 +190,8 @@ system call first appeared in Linux 2.6.13.
.SH CONFORMING TO
This system call is Linux-specific.
.SH NOTES
Currently, there is no glibc support for
.BR kexec_load ().
Call it using
Currently, there is no glibc support for these system calls.
Call them using
.BR syscall (2).
.PP
The required constants are in the Linux kernel source file