Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 63 for syscall (0.17 sec)

  1. internal/lock/lock_solaris.go

    package lock
    
    import (
    	"os"
    	"syscall"
    )
    
    // lockedOpenFile is an internal function.
    func lockedOpenFile(path string, flag int, perm os.FileMode, rlockType int) (*LockedFile, error) {
    	var lockType int16
    	switch flag {
    	case syscall.O_RDONLY:
    		lockType = syscall.F_RDLCK
    	case syscall.O_WRONLY:
    		fallthrough
    	case syscall.O_RDWR:
    		fallthrough
    	case syscall.O_WRONLY | syscall.O_CREAT:
    		fallthrough
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 2.8K bytes
    - Viewed (0)
  2. cmd/os_windows.go

    	globAllP, err := syscall.UTF16PtrFromString(globAll)
    	if err != nil {
    		return nil, errInvalidArgument
    	}
    	data := &syscall.Win32finddata{}
    	handle, err := syscall.FindFirstFile(globAllP, data)
    	if err != nil {
    		return nil, syscallErrToFileErr(dirPath, err)
    	}
    
    	defer syscall.FindClose(handle)
    
    	count := opts.count
    	for ; count != 0; err = syscall.FindNextFile(handle, data) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Oct 18 18:08:15 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  3. cmd/xl-storage-errors.go

    package cmd
    
    import (
    	"errors"
    	"os"
    	"runtime"
    	"syscall"
    )
    
    // No space left on device error
    func isSysErrNoSpace(err error) bool {
    	return errors.Is(err, syscall.ENOSPC)
    }
    
    // Invalid argument, unsupported flags such as O_DIRECT
    func isSysErrInvalidArg(err error) bool {
    	return errors.Is(err, syscall.EINVAL)
    }
    
    // Input/output error
    func isSysErrIO(err error) bool {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Mar 06 16:56:29 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  4. cmd/xl-storage-errors_test.go

    package cmd
    
    import (
    	"os"
    	"runtime"
    	"syscall"
    	"testing"
    )
    
    func TestSysErrors(t *testing.T) {
    	pathErr := &os.PathError{Err: syscall.ENAMETOOLONG}
    	ok := isSysErrTooLong(pathErr)
    	if !ok {
    		t.Fatalf("Unexpected error expecting %s", syscall.ENAMETOOLONG)
    	}
    	pathErr = &os.PathError{Err: syscall.ENOTDIR}
    	ok = isSysErrNotDir(pathErr)
    	if !ok {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 1.7K bytes
    - Viewed (0)
  5. internal/http/check_port_linux.go

    	lc := &net.ListenConfig{
    		Control: func(network, address string, c syscall.RawConn) error {
    			c.Control(func(fdPtr uintptr) {
    				if opts.Interface != "" {
    					// When interface is specified look for specifically port availability on
    					// the specified interface if any.
    					_ = syscall.SetsockoptString(int(fdPtr), syscall.SOL_SOCKET, syscall.SO_BINDTODEVICE, opts.Interface)
    				}
    			})
    			return nil
    		},
    	}
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed May 03 21:12:25 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  6. cmd/os-rename_linux.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    import (
    	"syscall"
    )
    
    // RenameSys is low level call in case of Linux this uses syscall.Rename() directly.
    func RenameSys(src, dst string) (err error) {
    	return syscall.Rename(src, dst)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 15 01:09:38 GMT 2024
    - 999 bytes
    - Viewed (0)
  7. internal/disk/type_windows.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package disk
    
    import (
    	"path/filepath"
    	"syscall"
    	"unsafe"
    )
    
    // GetVolumeInformation provides windows drive volume information.
    var GetVolumeInformation = kernel32.NewProc("GetVolumeInformationW")
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 2.2K bytes
    - Viewed (0)
  8. internal/disk/stat_bsd.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package disk
    
    import (
    	"errors"
    	"fmt"
    	"syscall"
    )
    
    // GetInfo returns total and free bytes available in a directory, e.g. `/`.
    func GetInfo(path string, _ bool) (info Info, err error) {
    	s := syscall.Statfs_t{}
    	err = syscall.Statfs(path, &s)
    	if err != nil {
    		return Info{}, err
    	}
    	reservedBlocks := s.Bfree - s.Bavail
    	info = Info{
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 26 19:34:50 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  9. internal/disk/stat_freebsd.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package disk
    
    import (
    	"errors"
    	"fmt"
    	"syscall"
    )
    
    // GetInfo returns total and free bytes available in a directory, e.g. `/`.
    func GetInfo(path string, _ bool) (info Info, err error) {
    	s := syscall.Statfs_t{}
    	err = syscall.Statfs(path, &s)
    	if err != nil {
    		return Info{}, err
    	}
    	reservedBlocks := s.Bfree - uint64(s.Bavail)
    	info = Info{
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 26 19:34:50 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  10. internal/disk/stat_windows.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package disk
    
    import (
    	"errors"
    	"fmt"
    	"os"
    	"syscall"
    	"unsafe"
    
    	"golang.org/x/sys/windows"
    )
    
    var (
    	kernel32 = windows.NewLazySystemDLL("kernel32.dll")
    
    	// GetDiskFreeSpaceEx - https://msdn.microsoft.com/en-us/library/windows/desktop/aa364937(v=vs.85).aspx
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 26 19:34:50 GMT 2024
    - 4.1K bytes
    - Viewed (0)
Back to top