mirror of
https://github.com/mudler/luet.git
synced 2025-09-22 03:27:38 +00:00
Update vendor Sabayon/pkgs-checker@v0.8.4 (#255)
* Update vendor Sabayon/pkgs-checker@v0.8.4 * Drop golang.org/x/text Co-authored-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
This commit is contained in:
24
vendor/golang.org/x/sys/unix/ioctl_linux.go
generated
vendored
24
vendor/golang.org/x/sys/unix/ioctl_linux.go
generated
vendored
@@ -48,15 +48,15 @@ func IoctlSetRTCWkAlrm(fd int, value *RTCWkAlrm) error {
|
||||
// IoctlGetEthtoolDrvinfo fetches ethtool driver information for the network
|
||||
// device specified by ifname.
|
||||
func IoctlGetEthtoolDrvinfo(fd int, ifname string) (*EthtoolDrvinfo, error) {
|
||||
ifr, err := newIfreq(ifname)
|
||||
ifr, err := NewIfreq(ifname)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
value := EthtoolDrvinfo{Cmd: ETHTOOL_GDRVINFO}
|
||||
ifrd := ifr.SetData(unsafe.Pointer(&value))
|
||||
ifrd := ifr.withData(unsafe.Pointer(&value))
|
||||
|
||||
err = ioctlPtr(fd, SIOCETHTOOL, unsafe.Pointer(&ifrd))
|
||||
err = ioctlIfreqData(fd, SIOCETHTOOL, &ifrd)
|
||||
return &value, err
|
||||
}
|
||||
|
||||
@@ -176,3 +176,21 @@ func IoctlHIDGetRawUniq(fd int) (string, error) {
|
||||
err := ioctlPtr(fd, _HIDIOCGRAWUNIQ, unsafe.Pointer(&value[0]))
|
||||
return ByteSliceToString(value[:]), err
|
||||
}
|
||||
|
||||
// IoctlIfreq performs an ioctl using an Ifreq structure for input and/or
|
||||
// output. See the netdevice(7) man page for details.
|
||||
func IoctlIfreq(fd int, req uint, value *Ifreq) error {
|
||||
// It is possible we will add more fields to *Ifreq itself later to prevent
|
||||
// misuse, so pass the raw *ifreq directly.
|
||||
return ioctlPtr(fd, req, unsafe.Pointer(&value.raw))
|
||||
}
|
||||
|
||||
// TODO(mdlayher): export if and when IfreqData is exported.
|
||||
|
||||
// ioctlIfreqData performs an ioctl using an ifreqData structure for input
|
||||
// and/or output. See the netdevice(7) man page for details.
|
||||
func ioctlIfreqData(fd int, req uint, value *ifreqData) error {
|
||||
// The memory layout of IfreqData (type-safe) and ifreq (not type-safe) are
|
||||
// identical so pass *IfreqData directly.
|
||||
return ioctlPtr(fd, req, unsafe.Pointer(value))
|
||||
}
|
||||
|
Reference in New Issue
Block a user