mirror of
https://github.com/containers/skopeo.git
synced 2025-09-25 12:16:17 +00:00
Vendor in latest containers storage
We want to get support into skopeo for handling override_kernel_checks so that we can use overlay backend on RHEL. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
20
vendor/github.com/containers/storage/pkg/dmesg/dmesg_linux.go
generated
vendored
Normal file
20
vendor/github.com/containers/storage/pkg/dmesg/dmesg_linux.go
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
// +build linux
|
||||
|
||||
package dmesg
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// Dmesg returns last messages from the kernel log, up to size bytes
|
||||
func Dmesg(size int) []byte {
|
||||
t := uintptr(3) // SYSLOG_ACTION_READ_ALL
|
||||
b := make([]byte, size)
|
||||
amt, _, err := unix.Syscall(unix.SYS_SYSLOG, t, uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)))
|
||||
if err != 0 {
|
||||
return []byte{}
|
||||
}
|
||||
return b[:amt]
|
||||
}
|
Reference in New Issue
Block a user