github.com/nibnait/go-learn@v0.0.0-20220227013611-dfa47ea6d2da/src/pkg/mod/golang.org/x/sys@v0.0.0-20210630005230-0f9fa26af87c/plan9/errors_plan9.go (about) 1 // Copyright 2011 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package plan9 6 7 import "syscall" 8 9 // Constants 10 const ( 11 // Invented values to support what package os expects. 12 O_CREAT = 0x02000 13 O_APPEND = 0x00400 14 O_NOCTTY = 0x00000 15 O_NONBLOCK = 0x00000 16 O_SYNC = 0x00000 17 O_ASYNC = 0x00000 18 19 S_IFMT = 0x1f000 20 S_IFIFO = 0x1000 21 S_IFCHR = 0x2000 22 S_IFDIR = 0x4000 23 S_IFBLK = 0x6000 24 S_IFREG = 0x8000 25 S_IFLNK = 0xa000 26 S_IFSOCK = 0xc000 27 ) 28 29 // Errors 30 var ( 31 EINVAL = syscall.NewError("bad arg in system call") 32 ENOTDIR = syscall.NewError("not a directory") 33 EISDIR = syscall.NewError("file is a directory") 34 ENOENT = syscall.NewError("file does not exist") 35 EEXIST = syscall.NewError("file already exists") 36 EMFILE = syscall.NewError("no free file descriptors") 37 EIO = syscall.NewError("i/o error") 38 ENAMETOOLONG = syscall.NewError("file name too long") 39 EINTR = syscall.NewError("interrupted") 40 EPERM = syscall.NewError("permission denied") 41 EBUSY = syscall.NewError("no free devices") 42 ETIMEDOUT = syscall.NewError("connection timed out") 43 EPLAN9 = syscall.NewError("not supported by plan 9") 44 45 // The following errors do not correspond to any 46 // Plan 9 system messages. Invented to support 47 // what package os and others expect. 48 EACCES = syscall.NewError("access permission denied") 49 EAFNOSUPPORT = syscall.NewError("address family not supported by protocol") 50 )