1// Copyright 2014 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 5package syscall 6 7// Plan 9 Constants 8 9// Open modes 10const ( 11 O_RDONLY = 0 12 O_WRONLY = 1 13 O_RDWR = 2 14 O_TRUNC = 16 15 O_CLOEXEC = 32 16 O_EXCL = 0x1000 17) 18 19// Bind flags 20const ( 21 MORDER = 0x0003 // mask for bits defining order of mounting 22 MREPL = 0x0000 // mount replaces object 23 MBEFORE = 0x0001 // mount goes before others in union directory 24 MAFTER = 0x0002 // mount goes after others in union directory 25 MCREATE = 0x0004 // permit creation in mounted directory 26 MCACHE = 0x0010 // cache some data 27 MMASK = 0x0017 // all bits on 28) 29 30// Rfork flags 31const ( 32 RFNAMEG = 1 << 0 33 RFENVG = 1 << 1 34 RFFDG = 1 << 2 35 RFNOTEG = 1 << 3 36 RFPROC = 1 << 4 37 RFMEM = 1 << 5 38 RFNOWAIT = 1 << 6 39 RFCNAMEG = 1 << 10 40 RFCENVG = 1 << 11 41 RFCFDG = 1 << 12 42 RFREND = 1 << 13 43 RFNOMNT = 1 << 14 44) 45 46// Qid.Type bits 47const ( 48 QTDIR = 0x80 49 QTAPPEND = 0x40 50 QTEXCL = 0x20 51 QTMOUNT = 0x10 52 QTAUTH = 0x08 53 QTTMP = 0x04 54 QTFILE = 0x00 55) 56 57// Dir.Mode bits 58const ( 59 DMDIR = 0x80000000 60 DMAPPEND = 0x40000000 61 DMEXCL = 0x20000000 62 DMMOUNT = 0x10000000 63 DMAUTH = 0x08000000 64 DMTMP = 0x04000000 65 DMREAD = 0x4 66 DMWRITE = 0x2 67 DMEXEC = 0x1 68) 69 70const ( 71 STATMAX = 65535 72 ERRMAX = 128 73 STATFIXLEN = 49 74) 75