- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 57 for EINVAL (0.22 sec)
-
src/syscall/syscall.go
} // ByteSliceFromString returns a NUL-terminated slice of bytes // containing the text of s. If s contains a NUL byte at any // location, it returns (nil, [EINVAL]). func ByteSliceFromString(s string) ([]byte, error) { if bytealg.IndexByteString(s, 0) != -1 { return nil, EINVAL } a := make([]byte, len(s)+1) copy(a, s) return a, nil } // StringBytePtr returns a pointer to a NUL-terminated array of bytes.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:03:59 UTC 2024 - 3.8K bytes - Viewed (0) -
src/internal/syscall/unix/getentropy_netbsd.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 15 19:42:54 UTC 2023 - 779 bytes - Viewed (0) -
src/syscall/dirent_test.go
t.Fatalf("syscall.open: %v", err) } defer syscall.Close(fd) buf := bytes.Repeat([]byte{0xCD}, direntBufSize) for { n, err := syscall.ReadDirent(fd, buf) if err == syscall.EINVAL { // On linux, 'man getdents64' says that EINVAL indicates “result buffer is too small”. // Try a bigger buffer. t.Logf("ReadDirent: %v; retrying with larger buffer", err) buf = bytes.Repeat([]byte{0xCD}, len(buf)*2) continue }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 3.4K bytes - Viewed (0) -
src/net/file_plan9.go
// license that can be found in the LICENSE file. package net import ( "errors" "io" "os" "syscall" ) func (fd *netFD) status(ln int) (string, error) { if !fd.ok() { return "", syscall.EINVAL } status, err := os.Open(fd.dir + "/status") if err != nil { return "", err } defer status.Close() buf := make([]byte, ln) n, err := io.ReadFull(status, buf[:]) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 20 06:04:31 UTC 2024 - 2.8K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sys/unix/ifreq_linux.go
return nil, EINVAL } return raw.Addr[:], nil } // SetInet4Addr sets a C in_addr/Go []byte (4-byte IPv4 address) value in an // embedded sockaddr within the Ifreq's union data. v must be 4 bytes in length // or an error will be returned. func (ifr *Ifreq) SetInet4Addr(v []byte) error { if len(v) != 4 { return EINVAL } var addr [4]byte copy(addr[:], v)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 4.3K bytes - Viewed (0) -
src/internal/poll/copy_file_range_linux.go
return 0, false, nil case syscall.EXDEV, syscall.EINVAL, syscall.EIO, syscall.EOPNOTSUPP, syscall.EPERM: // Prior to Linux 5.3, it was not possible to // copy_file_range across file systems. Similarly to // the ENOSYS case above, if we see EXDEV, we have // not transferred any data, and we can let the caller // fall back to generic code. // // As for EINVAL, that is what we see if, for example,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 17:40:10 UTC 2024 - 3.9K bytes - Viewed (0) -
src/internal/poll/splice_linux.go
max := maxSpliceSize if int64(max) > remain { max = int(remain) } inPipe, err = spliceDrain(p.wfd, src, max) // The operation is considered handled if splice returns no // error, or an error other than EINVAL. An EINVAL means the // kernel does not support splice for the socket type of src. // The failed syscall does not consume any data so it is safe // to fall back to a generic copy. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 21:49:26 UTC 2024 - 7.6K bytes - Viewed (0) -
src/net/tcpsock_unix.go
package net import "syscall" // SetKeepAliveConfig configures keep-alive messages sent by the operating system. func (c *TCPConn) SetKeepAliveConfig(config KeepAliveConfig) error { if !c.ok() { return syscall.EINVAL } if err := setKeepAlive(c.fd, config.Enable); err != nil { return &OpError{Op: "set", Net: c.fd.net, Source: c.fd.laddr, Addr: c.fd.raddr, Err: err} } if err := setKeepAliveIdle(c.fd, config.Idle); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 15 03:10:07 UTC 2024 - 1.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sys/unix/sysvshm_unix.go
} // SysvShmDetach unmaps the shared memory slice returned from SysvShmAttach. // // It is not safe to use the slice after calling this function. func SysvShmDetach(data []byte) error { if len(data) == 0 { return EINVAL } return shmdt(uintptr(unsafe.Pointer(&data[0]))) } // SysvShmGet returns the Sysv shared memory identifier associated with key. // If the IPC_CREAT flag is specified a new segment is created.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 16:12:58 UTC 2024 - 1.4K bytes - Viewed (0) -
src/net/tcpsock_windows.go
"syscall" ) // SetKeepAliveConfig configures keep-alive messages sent by the operating system. func (c *TCPConn) SetKeepAliveConfig(config KeepAliveConfig) error { if !c.ok() { return syscall.EINVAL } if err := setKeepAlive(c.fd, config.Enable); err != nil { return &OpError{Op: "set", Net: c.fd.net, Source: c.fd.laddr, Addr: c.fd.raddr, Err: err} }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 11:49:35 UTC 2024 - 1.3K bytes - Viewed (0)