Imports #
"syscall"
"unsafe"
"unsafe"
"unsafe"
"bytes"
"strings"
"unsafe"
"bytes"
"syscall"
"unsafe"
"unsafe"
"syscall"
"syscall"
"runtime"
"unsafe"
"errors"
"syscall"
"unsafe"
"unsafe"
"unsafe"
"bytes"
"strings"
"unsafe"
"bytes"
"syscall"
"unsafe"
"unsafe"
"syscall"
"syscall"
"runtime"
"unsafe"
"errors"
Dir.Mode bits
const DMAPPEND = 0x40000000Dir.Mode bits
const DMAUTH = 0x08000000Dir.Mode bits
const DMDIR = 0x80000000Dir.Mode bits
const DMEXCL = 0x20000000Dir.Mode bits
const DMEXEC = 0x1Dir.Mode bits
const DMMOUNT = 0x10000000Dir.Mode bits
const DMREAD = 0x4Dir.Mode bits
const DMTMP = 0x04000000Dir.Mode bits
const DMWRITE = 0x2The following errors do not correspond to any Plan 9 system messages. Invented to support what package os and others expect.
var EACCES = *ast.CallExprErrors
var EAFNOSUPPORT = *ast.CallExprErrors
var EBUSY = *ast.CallExprErrors
var EEXIST = *ast.CallExprErrors
var EINTR = *ast.CallExprErrors
var EINVAL = *ast.CallExprErrors
var EIO = *ast.CallExprErrors
var EISDIR = *ast.CallExprErrors
var EMFILE = *ast.CallExprErrors
var ENAMETOOLONG = *ast.CallExprErrors
var ENOENT = *ast.CallExprErrors
var ENOTDIR = *ast.CallExprErrors
var EPERM = *ast.CallExprErrors
var EPLAN9 = *ast.CallExprconst ERRMAX = 128Errors
var ETIMEDOUT = *ast.CallExprvar ErrBadName = *ast.CallExprvar ErrBadStat = *ast.CallExprvar ErrShortStat = *ast.CallExprMount and bind flags
const MAFTER = 0x0002Mount and bind flags
const MBEFORE = 0x0001Mount and bind flags
const MCACHE = 0x0010Mount and bind flags
const MCREATE = 0x0004Mount and bind flags
const MMASK = 0x0017Mount and bind flags
const MORDER = 0x0003Mount and bind flags
const MREPL = 0x0000Constants
const O_APPEND = 0x00400Constants
const O_ASYNC = 0x00000Open modes
const O_CLOEXEC = 32Invented values to support what package os expects.
const O_CREAT = 0x02000Open modes
const O_EXCL = 0x1000Constants
const O_NOCTTY = 0x00000Constants
const O_NONBLOCK = 0x00000Open modes
const O_RDONLY = 0Open modes
const O_RDWR = 2Constants
const O_SYNC = 0x00000Open modes
const O_TRUNC = 16Open modes
const O_WRONLY = 1Qid.Type bits
const QTAPPEND = 0x40Qid.Type bits
const QTAUTH = 0x08Qid.Type bits
const QTDIR = 0x80Qid.Type bits
const QTEXCL = 0x20Qid.Type bits
const QTFILE = 0x00Qid.Type bits
const QTMOUNT = 0x10Qid.Type bits
const QTTMP = 0x04Rfork flags
const RFCENVG = *ast.BinaryExprRfork flags
const RFCFDG = *ast.BinaryExprRfork flags
const RFCNAMEG = *ast.BinaryExprRfork flags
const RFENVG = *ast.BinaryExprRfork flags
const RFFDG = *ast.BinaryExprRfork flags
const RFMEM = *ast.BinaryExprRfork flags
const RFNAMEG = *ast.BinaryExprRfork flags
const RFNOMNT = *ast.BinaryExprRfork flags
const RFNOTEG = *ast.BinaryExprRfork flags
const RFNOWAIT = *ast.BinaryExprRfork flags
const RFPROC = *ast.BinaryExprRfork flags
const RFREND = *ast.BinaryExprconst STATFIXLEN = 49const STATMAX = 65535const SYS_ALARM = 6const SYS_AWAIT = 47const SYS_BIND = 2const SYS_BRK_ = 24const SYS_CHDIR = 3const SYS_CLOSE = 4const SYS_CREATE = 22const SYS_DUP = 5const SYS_ERRSTR = 41const SYS_EXEC = 7const SYS_EXITS = 8const SYS_FAUTH = 10const SYS_FD2PATH = 23const SYS_FSTAT = 43const SYS_FVERSION = 40const SYS_FWSTAT = 45const SYS_MOUNT = 46const SYS_NOTED = 29const SYS_NOTIFY = 28const SYS_NSEC = 53const SYS_OPEN = 14const SYS_OSEEK = 16const SYS_PIPE = 21const SYS_PREAD = 50const SYS_PWRITE = 51const SYS_REMOVE = 25const SYS_RENDEZVOUS = 34const SYS_RFORK = 19const SYS_SEEK = 39const SYS_SEGATTACH = 30const SYS_SEGBRK = 12const SYS_SEGDETACH = 31const SYS_SEGFLUSH = 33const SYS_SEGFREE = 32const SYS_SEMACQUIRE = 37const SYS_SEMRELEASE = 38const SYS_SLEEP = 17const SYS_STAT = 42const SYS_SYSR1 = 0const SYS_TSEMACQUIRE = 52const SYS_UNMOUNT = 35const SYS_WSTAT = 44Constants
const S_IFBLK = 0x6000Constants
const S_IFCHR = 0x2000Constants
const S_IFDIR = 0x4000Constants
const S_IFIFO = 0x1000Constants
const S_IFLNK = 0xa000Constants
const S_IFMT = 0x1f000Constants
const S_IFREG = 0x8000Constants
const S_IFSOCK = 0xc000For testing: clients can set this flag to force creation of IPv6 sockets to return EAFNOSUPPORT.
var SocketDisableIPv6 boolvar Stderr = 2var Stdin = 0var Stdout = 1Single-word zero for use when we need a valid pointer to 0 bytes. See mksyscall.pl.
var _zero uintptrvar ioSync int64var nullDir = Dir{...}const raceenabled = trueconst raceenabled = falseA Note is a string describing a process note. It implements the os.Signal interface.
type Note stringA Dir contains the metadata for a file.
type Dir struct {
Type uint16
Dev uint32
Qid Qid
Mode uint32
Atime uint32
Mtime uint32
Length int64
Name string
Uid string
Gid string
Muid string
}A Qid represents a 9P server's unique identification for a file.
type Qid struct {
Path uint64
Vers uint32
Type uint8
}type Timespec struct {
Sec int32
Nsec int32
}type Timeval struct {
Sec int32
Usec int32
}type Waitmsg struct {
Pid int
Time [3]uint32
Msg string
}func Await(w *Waitmsg) (err error)func Bind(name string, old string, flag int) (err error)BytePtrFromString returns a pointer to a NUL-terminated array of bytes containing the text of s. If s contains a NUL byte at any location, it returns (nil, EINVAL).
func BytePtrFromString(s string) (*byte, error)BytePtrToString takes a pointer to a sequence of text and returns the corresponding string. If the pointer is nil, it returns the empty string. It assumes that the text sequence is terminated at a zero byte; if the zero byte is not present, the program may crash.
func BytePtrToString(p *byte) stringByteSliceFromString 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)ByteSliceToString returns a string form of the text represented by the slice s, with a terminating NUL and any bytes after the NUL removed.
func ByteSliceToString(s []byte) stringfunc Chdir(path string) errorfunc Chdir(path string) errorfunc Clearenv()func Close(fd int) (err error)func Close(fd int) (err error)func Close(fd int) (err error)func Create(path string, mode int, perm uint32) (fd int, err error)func Dup(oldfd int, newfd int) (fd int, err error)func Dup(oldfd int, newfd int) (fd int, err error)func Dup(oldfd int, newfd int) (fd int, err error)func Environ() []stringfunc Exit(code int)func (w Waitmsg) ExitStatus() intfunc (w Waitmsg) Exited() boolfunc Fchdir(fd int) (err error)func Fd2path(fd int) (path string, err error)func Fstat(fd int, edir []byte) (n int, err error)func Fstat(fd int, edir []byte) (n int, err error)func Fstat(fd int, edir []byte) (n int, err error)func Fwstat(fd int, edir []byte) (err error)func Fwstat(fd int, edir []byte) (err error)func Fwstat(fd int, edir []byte) (err error)func Getegid() (egid int)func Getenv(key string) (value string, found bool)func Geteuid() (euid int)func Getgid() (gid int)func Getgroups() (gids []int, err error)func Getpagesize() intfunc Getpid() (pid int)func Getppid() (ppid int)func Gettimeofday(tv *Timeval) errorfunc Getuid() (uid int)func Getwd() (wd string, err error)func Getwd() (wd string, err error)Marshal encodes a 9P stat message corresponding to d into b If there isn't enough space in b for a stat message, ErrShortStat is returned.
func (d *Dir) Marshal(b []byte) (n int, err error)func Mkdir(path string, mode uint32) (err error)func Mount(fd int, afd int, old string, flag int, aname string) (err error)func (ts *Timespec) Nano() int64func (tv *Timeval) Nano() int64func NsecToTimeval(nsec int64) (tv Timeval)Null assigns special "don't touch" values to members of d to avoid modifying them during plan9.Wstat.
func (d *Dir) Null()func Open(path string, mode int) (fd int, err error)func Pipe(p []int) (err error)func Pread(fd int, p []byte, offset int64) (n int, err error)func Pread(fd int, p []byte, offset int64) (n int, err error)func Pread(fd int, p []byte, offset int64) (n int, err error)func Pwrite(fd int, p []byte, offset int64) (n int, err error)func Pwrite(fd int, p []byte, offset int64) (n int, err error)func Pwrite(fd int, p []byte, offset int64) (n int, err error)func RawSyscall(trap uintptr, a1 uintptr, a2 uintptr, a3 uintptr) (r1 uintptr, r2 uintptr, err uintptr)func RawSyscall6(trap uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr) (r1 uintptr, r2 uintptr, err uintptr)func Read(fd int, p []byte) (n int, err error)func Remove(path string) errorfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error)func Setenv(key string, value string) errorfunc (n Note) Signal()func (w Waitmsg) Signaled() boolfunc Stat(path string, edir []byte) (n int, err error)func (n Note) String() stringfunc Syscall(trap uintptr, a1 uintptr, a2 uintptr, a3 uintptr) (r1 uintptr, r2 uintptr, err syscall.ErrorString)func Syscall6(trap uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr) (r1 uintptr, r2 uintptr, err syscall.ErrorString)func (tv *Timeval) Unix() (sec int64, nsec int64)func (ts *Timespec) Unix() (sec int64, nsec int64)UnmarshalDir decodes a single 9P stat message from b and returns the resulting Dir. If b is too small to hold a valid stat message, ErrShortStat is returned. If the stat message itself is invalid, ErrBadStat is returned.
func UnmarshalDir(b []byte) (*Dir, error)func Unmount(name string, old string) (err error)func Unsetenv(key string) errorfunc Write(fd int, p []byte) (n int, err error)func Wstat(path string, edir []byte) (err error)func atoi(b []byte) (n uint)func await(s []byte) (n int, err error)func await(s []byte) (n int, err error)func await(s []byte) (n int, err error)func bind(name string, old string, flag int) (err error)func bind(name string, old string, flag int) (err error)func bind(name string, old string, flag int) (err error)func chdir(path string) (err error)func chdir(path string) (err error)func chdir(path string) (err error)func create(path string, mode int, perm uint32) (fd int, err error)func create(path string, mode int, perm uint32) (fd int, err error)func create(path string, mode int, perm uint32) (fd int, err error)func cstring(s []byte) stringfunc errstr() stringImplemented in assembly to import from runtime.
func exit(code int)func fd2path(fd int, buf []byte) (err error)func fd2path(fd int, buf []byte) (err error)func fd2path(fd int, buf []byte) (err error)func fixwd()func fixwd()gbit16 reads a 16-bit number in little-endian order from b and returns it with the remaining slice of b.
func gbit16(b []byte) (uint16, []byte)gbit32 reads a 32-bit number in little-endian order from b and returns it with the remaining slice of b.
func gbit32(b []byte) (uint32, []byte)gbit64 reads a 64-bit number in little-endian order from b and returns it with the remaining slice of b.
func gbit64(b []byte) (uint64, []byte)gbit8 reads an 8-bit number from b and returns it with the remaining slice of b.
func gbit8(b []byte) (uint8, []byte)gstring reads a string from b, prefixed with a 16-bit length in little-endian order. It returns the string with the remaining slice of b and a boolean. If the length is greater than the number of bytes in b, the boolean will be false.
func gstring(b []byte) (string, []byte, bool)func itoa(val int) stringfunc mount(fd int, afd int, old string, flag int, aname string) (err error)func mount(fd int, afd int, old string, flag int, aname string) (err error)func mount(fd int, afd int, old string, flag int, aname string) (err error)func nsec() int64func open(path string, mode int) (fd int, err error)func open(path string, mode int) (fd int, err error)func open(path string, mode int) (fd int, err error)pbit16 copies the 16-bit number v to b in little-endian order and returns the remaining slice of b.
func pbit16(b []byte, v uint16) []bytepbit32 copies the 32-bit number v to b in little-endian order and returns the remaining slice of b.
func pbit32(b []byte, v uint32) []bytepbit64 copies the 64-bit number v to b in little-endian order and returns the remaining slice of b.
func pbit64(b []byte, v uint64) []bytepbit8 copies the 8-bit number v to b and returns the remaining slice of b.
func pbit8(b []byte, v uint8) []bytefunc pipe(p *[2]int32) (err error)func pipe(p *[2]int32) (err error)func pipe(p *[2]int32) (err error)pstring copies the string s to b, prepending it with a 16-bit length in little-endian order, and returning the remaining slice of b..
func pstring(b []byte, s string) []bytefunc raceAcquire(addr unsafe.Pointer)func raceAcquire(addr unsafe.Pointer)func raceReadRange(addr unsafe.Pointer, len int)func raceReadRange(addr unsafe.Pointer, len int)func raceReleaseMerge(addr unsafe.Pointer)func raceReleaseMerge(addr unsafe.Pointer)func raceWriteRange(addr unsafe.Pointer, len int)func raceWriteRange(addr unsafe.Pointer, len int)func readnum(path string) (uint, error)func remove(path string) (err error)func remove(path string) (err error)func remove(path string) (err error)Underlying system call writes to newoffset via pointer. Implemented in assembly to avoid allocation.
func seek(placeholder uintptr, fd int, offset int64, whence int) (newoffset int64, err string)func stat(path string, edir []byte) (n int, err error)func stat(path string, edir []byte) (n int, err error)func stat(path string, edir []byte) (n int, err error)use is a no-op, but the compiler cannot see that it is. Calling use(p) ensures that p is kept live until that point. go:noescape
func use(p unsafe.Pointer)func wstat(path string, edir []byte) (err error)func wstat(path string, edir []byte) (err error)func wstat(path string, edir []byte) (err error)Generated with Arrow