unix: export KexecFileLoad on linux/arm

CL 175158 added the generated kexecFileLoad wrapper but forgot to add
the exported KexecFileLoad and the corresponding //sys line.

Change-Id: Ic94ce83dbb1ecc3d07080b4b4dfe35934ec54d57
Reviewed-on: https://go-review.googlesource.com/c/sys/+/175657
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Tobias Klauser
2019-05-07 08:32:47 +02:00
committed by Tobias Klauser
parent 2953c62de4
commit ecd444e865

View File

@@ -272,3 +272,16 @@ func SyncFileRange(fd int, off int64, n int64, flags int) error {
// order of their arguments.
return armSyncFileRange(fd, flags, off, n)
}
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
cmdlineLen := len(cmdline)
if cmdlineLen > 0 {
// Account for the additional NULL byte added by
// BytePtrFromString in kexecFileLoad. The kexec_file_load
// syscall expects a NULL-terminated string.
cmdlineLen++
}
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
}