Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 145 for O_RDONLY (0.24 sec)

  1. src/runtime/defs1_linux.go

    GOARCH=amd64 cgo -cdefs defs.go defs1.go >amd64/defs.h
    */
    
    package runtime
    
    /*
    #include <ucontext.h>
    #include <fcntl.h>
    #include <asm/signal.h>
    */
    import "C"
    
    const (
    	O_RDONLY    = C.O_RDONLY
    	O_NONBLOCK  = C.O_NONBLOCK
    	O_CLOEXEC   = C.O_CLOEXEC
    	SA_RESTORER = C.SA_RESTORER
    )
    
    type Usigset C.__sigset_t
    type Fpxreg C.struct__libc_fpxreg
    type Xmmreg C.struct__libc_xmmreg
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 845 bytes
    - Viewed (0)
  2. src/runtime/defs3_linux.go

    #define	_SYS_TYPES_H	// avoid inclusion of sys/types.h
    #include <asm/ucontext.h>
    #include <asm-generic/fcntl.h>
    */
    import "C"
    
    const (
    	O_RDONLY    = C.O_RDONLY
    	O_CLOEXEC   = C.O_CLOEXEC
    	SA_RESTORER = 0 // unused
    )
    
    type Usigset C.__sigset_t
    
    // types used in sigcontext
    type Ptregs C.struct_pt_regs
    type Gregset C.elf_gregset_t
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 1.1K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/sys/plan9/pwd_plan9.go

    // license that can be found in the LICENSE file.
    
    //go:build !go1.5
    
    package plan9
    
    func fixwd() {
    }
    
    func Getwd() (wd string, err error) {
    	fd, err := open(".", O_RDONLY)
    	if err != nil {
    		return "", err
    	}
    	defer Close(fd)
    	return Fd2path(fd)
    }
    
    func Chdir(path string) error {
    	return chdir(path)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 413 bytes
    - Viewed (0)
  4. src/runtime/defs2_linux.go

    	BUS_OBJERR = C.BUS_OBJERR
    
    	SEGV_MAPERR = C.SEGV_MAPERR
    	SEGV_ACCERR = C.SEGV_ACCERR
    
    	ITIMER_REAL    = C.ITIMER_REAL
    	ITIMER_VIRTUAL = C.ITIMER_VIRTUAL
    	ITIMER_PROF    = C.ITIMER_PROF
    
    	O_RDONLY  = C.O_RDONLY
    	O_CLOEXEC = C.O_CLOEXEC
    )
    
    type Fpreg C.struct__fpreg
    type Fpxreg C.struct__fpxreg
    type Xmmreg C.struct__xmmreg
    type Fpstate C.struct__fpstate
    type Timespec C.struct_timespec
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 07 18:28:11 UTC 2022
    - 3.2K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/sys/plan9/const_plan9.go

    package plan9
    
    // Plan 9 Constants
    
    // Open modes
    const (
    	O_RDONLY  = 0
    	O_WRONLY  = 1
    	O_RDWR    = 2
    	O_TRUNC   = 16
    	O_CLOEXEC = 32
    	O_EXCL    = 0x1000
    )
    
    // Rfork flags
    const (
    	RFNAMEG  = 1 << 0
    	RFENVG   = 1 << 1
    	RFFDG    = 1 << 2
    	RFNOTEG  = 1 << 3
    	RFPROC   = 1 << 4
    	RFMEM    = 1 << 5
    	RFNOWAIT = 1 << 6
    	RFCNAMEG = 1 << 10
    	RFCENVG  = 1 << 11
    	RFCFDG   = 1 << 12
    	RFREND   = 1 << 13
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 15 19:02:39 UTC 2021
    - 1004 bytes
    - Viewed (0)
  6. src/syscall/dirent_test.go

    		err := os.WriteFile(filepath.Join(d, name), nil, 0644)
    		if err != nil {
    			t.Fatalf("writefile: %v", err)
    		}
    	}
    
    	names := make([]string, 0, 10)
    
    	fd, err := syscall.Open(d, syscall.O_RDONLY, 0)
    	if err != nil {
    		t.Fatalf("syscall.open: %v", err)
    	}
    	defer syscall.Close(fd)
    
    	buf := bytes.Repeat([]byte{0xCD}, direntBufSize)
    	for {
    		n, err := syscall.ReadDirent(fd, buf)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  7. internal/ioutil/read_file_noatime_supported.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 ioutil
    
    import (
    	"os"
    )
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Aug 19 01:35:22 UTC 2021
    - 937 bytes
    - Viewed (0)
  8. src/time/zoneinfo_ios.go

    		roots = append(roots, goroot+"/lib/time")
    	}
    	wd, err := syscall.Getwd()
    	if err == nil {
    		roots = append(roots, wd)
    	}
    	for _, r := range roots {
    		var st syscall.Stat_t
    		fd, err := syscall.Open(r, syscall.O_RDONLY, 0)
    		if err != nil {
    			continue
    		}
    		defer syscall.Close(fd)
    		if err := syscall.Fstat(fd, &st); err == nil {
    			return r + "/zoneinfo.zip", true
    		}
    	}
    	return "", false
    }
    
    func initLocal() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 18 20:57:35 UTC 2022
    - 1K bytes
    - Viewed (0)
  9. src/time/sys_windows.go

    package time
    
    import (
    	"errors"
    	"syscall"
    )
    
    // for testing: whatever interrupts a sleep
    func interrupt() {
    }
    
    func open(name string) (uintptr, error) {
    	fd, err := syscall.Open(name, syscall.O_RDONLY, 0)
    	if err != nil {
    		// This condition solves issue https://go.dev/issue/50248
    		if err == syscall.ERROR_PATH_NOT_FOUND {
    			err = syscall.ENOENT
    		}
    		return 0, err
    	}
    	return uintptr(fd), nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 08 17:19:07 UTC 2022
    - 1.1K bytes
    - Viewed (0)
  10. src/cmd/pack/pack_test.go

    	name := filepath.Join(dir, "pack.a")
    	ar := openArchive(name, os.O_RDWR|os.O_CREATE, nil)
    	// Add an entry by hand.
    	ar.addFile(helloFile.Reset())
    	ar.a.File().Close()
    	// Now check it.
    	ar = openArchive(name, os.O_RDONLY, []string{helloFile.name})
    	var buf strings.Builder
    	stdout = &buf
    	verbose = true
    	defer func() {
    		stdout = os.Stdout
    		verbose = false
    	}()
    	ar.scan(ar.printContents)
    	ar.a.File().Close()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 04 16:27:35 UTC 2023
    - 12.5K bytes
    - Viewed (0)
Back to top