diff options
author | Gibheer <gibheer+git@zero-knowledge.org> | 2022-11-11 11:22:50 +0100 |
---|---|---|
committer | Gibheer <gibheer+git@zero-knowledge.org> | 2022-11-11 11:22:50 +0100 |
commit | fe6bd04947e26a962fab3cf7a354abd44333bda6 (patch) | |
tree | de4714364747c05d391ab665176413eb24938545 /vendor/golang.org/x/sys/unix/ioctl_linux.go | |
parent | dc9dfb76ff9375e6368e9e05a40e6dc07b325a8d (diff) |
update dependencies
Diffstat (limited to 'vendor/golang.org/x/sys/unix/ioctl_linux.go')
-rw-r--r-- | vendor/golang.org/x/sys/unix/ioctl_linux.go | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/vendor/golang.org/x/sys/unix/ioctl_linux.go b/vendor/golang.org/x/sys/unix/ioctl_linux.go index 884430b..0d12c08 100644 --- a/vendor/golang.org/x/sys/unix/ioctl_linux.go +++ b/vendor/golang.org/x/sys/unix/ioctl_linux.go @@ -4,9 +4,7 @@ package unix -import ( - "unsafe" -) +import "unsafe" // IoctlRetInt performs an ioctl operation specified by req on a device // associated with opened file descriptor fd, and returns a non-negative @@ -217,3 +215,19 @@ func IoctlKCMAttach(fd int, info KCMAttach) error { func IoctlKCMUnattach(fd int, info KCMUnattach) error { return ioctlPtr(fd, SIOCKCMUNATTACH, unsafe.Pointer(&info)) } + +// IoctlLoopGetStatus64 gets the status of the loop device associated with the +// file descriptor fd using the LOOP_GET_STATUS64 operation. +func IoctlLoopGetStatus64(fd int) (*LoopInfo64, error) { + var value LoopInfo64 + if err := ioctlPtr(fd, LOOP_GET_STATUS64, unsafe.Pointer(&value)); err != nil { + return nil, err + } + return &value, nil +} + +// IoctlLoopSetStatus64 sets the status of the loop device associated with the +// file descriptor fd using the LOOP_SET_STATUS64 operation. +func IoctlLoopSetStatus64(fd int, value *LoopInfo64) error { + return ioctlPtr(fd, LOOP_SET_STATUS64, unsafe.Pointer(value)) +} |