Documentation
¶
Overview ¶
Package linux returns information about what features are supported on the running kernel.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HasNewMountAPI = gocompat.SyncOnceValue(func() bool { fd, err := unix.OpenTree(-int(unix.EBADF), "/", unix.OPEN_TREE_CLOEXEC) if err != nil { return false } _ = unix.Close(fd) isNotBackport, _ := kernelversion.GreaterEqualThan(kernelversion.KernelVersion{5, 2}) return isNotBackport })
HasNewMountAPI returns whether the new fsopen(2) mount API is supported on the running kernel.
View Source
var HasOpenat2 = func() bool { if sawOpenat2Error.Load() { return false } fd, err := unix.Openat2(unix.AT_FDCWD, ".", &unix.OpenHow{ Flags: unix.O_PATH | unix.O_CLOEXEC, Resolve: unix.RESOLVE_NO_SYMLINKS | unix.RESOLVE_IN_ROOT, }) if err != nil { sawOpenat2Error.Store(true) return false } _ = unix.Close(fd) return true }
HasOpenat2 returns whether openat2(2) is supported on the running kernel.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.