mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-03 15:47:35 -04:00
unix: add additional file mode bit constants from sys/stat.h on Solaris
Also generate the constants using mkerrors.sh instead of having to list each of them manually in types_solaris.go In order to avoid _*_MAGIC constants being generated, also adjust the corresponding rule in mkerrors.sh Change-Id: If9193b12c2a2ec3b509a324be78329fee35a240d Reviewed-on: https://go-review.googlesource.com/130355 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
4ea2f632f6
commit
3b58ed4ad3
+2
-1
@@ -296,6 +296,7 @@ includes_SunOS='
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/sockio.h>
|
#include <sys/sockio.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
@@ -437,7 +438,7 @@ ccflags="$@"
|
|||||||
$2 ~ /^SECCOMP_MODE_/ ||
|
$2 ~ /^SECCOMP_MODE_/ ||
|
||||||
$2 ~ /^SPLICE_/ ||
|
$2 ~ /^SPLICE_/ ||
|
||||||
$2 !~ /^AUDIT_RECORD_MAGIC/ &&
|
$2 !~ /^AUDIT_RECORD_MAGIC/ &&
|
||||||
$2 ~ /^[A-Z0-9_]+_MAGIC2?$/ ||
|
$2 ~ /^[A-Z][A-Z0-9_]+_MAGIC2?$/ ||
|
||||||
$2 ~ /^(VM|VMADDR)_/ ||
|
$2 ~ /^(VM|VMADDR)_/ ||
|
||||||
$2 ~ /^IOCTL_VM_SOCKETS_/ ||
|
$2 ~ /^IOCTL_VM_SOCKETS_/ ||
|
||||||
$2 ~ /^(TASKSTATS|TS)_/ ||
|
$2 ~ /^(TASKSTATS|TS)_/ ||
|
||||||
|
|||||||
@@ -118,23 +118,6 @@ type _Gid_t C.gid_t
|
|||||||
|
|
||||||
// Files
|
// Files
|
||||||
|
|
||||||
const ( // Directory mode bits
|
|
||||||
S_IFMT = C.S_IFMT
|
|
||||||
S_IFIFO = C.S_IFIFO
|
|
||||||
S_IFCHR = C.S_IFCHR
|
|
||||||
S_IFDIR = C.S_IFDIR
|
|
||||||
S_IFBLK = C.S_IFBLK
|
|
||||||
S_IFREG = C.S_IFREG
|
|
||||||
S_IFLNK = C.S_IFLNK
|
|
||||||
S_IFSOCK = C.S_IFSOCK
|
|
||||||
S_ISUID = C.S_ISUID
|
|
||||||
S_ISGID = C.S_ISGID
|
|
||||||
S_ISVTX = C.S_ISVTX
|
|
||||||
S_IRUSR = C.S_IRUSR
|
|
||||||
S_IWUSR = C.S_IWUSR
|
|
||||||
S_IXUSR = C.S_IXUSR
|
|
||||||
)
|
|
||||||
|
|
||||||
type Stat_t C.struct_stat
|
type Stat_t C.struct_stat
|
||||||
|
|
||||||
type Flock_t C.struct_flock
|
type Flock_t C.struct_flock
|
||||||
|
|||||||
@@ -996,6 +996,39 @@ const (
|
|||||||
SO_USELOOPBACK = 0x40
|
SO_USELOOPBACK = 0x40
|
||||||
SO_VRRP = 0x1017
|
SO_VRRP = 0x1017
|
||||||
SO_WROFF = 0x2
|
SO_WROFF = 0x2
|
||||||
|
S_ENFMT = 0x400
|
||||||
|
S_IAMB = 0x1ff
|
||||||
|
S_IEXEC = 0x40
|
||||||
|
S_IFBLK = 0x6000
|
||||||
|
S_IFCHR = 0x2000
|
||||||
|
S_IFDIR = 0x4000
|
||||||
|
S_IFDOOR = 0xd000
|
||||||
|
S_IFIFO = 0x1000
|
||||||
|
S_IFLNK = 0xa000
|
||||||
|
S_IFMT = 0xf000
|
||||||
|
S_IFNAM = 0x5000
|
||||||
|
S_IFPORT = 0xe000
|
||||||
|
S_IFREG = 0x8000
|
||||||
|
S_IFSOCK = 0xc000
|
||||||
|
S_INSEM = 0x1
|
||||||
|
S_INSHD = 0x2
|
||||||
|
S_IREAD = 0x100
|
||||||
|
S_IRGRP = 0x20
|
||||||
|
S_IROTH = 0x4
|
||||||
|
S_IRUSR = 0x100
|
||||||
|
S_IRWXG = 0x38
|
||||||
|
S_IRWXO = 0x7
|
||||||
|
S_IRWXU = 0x1c0
|
||||||
|
S_ISGID = 0x400
|
||||||
|
S_ISUID = 0x800
|
||||||
|
S_ISVTX = 0x200
|
||||||
|
S_IWGRP = 0x10
|
||||||
|
S_IWOTH = 0x2
|
||||||
|
S_IWRITE = 0x80
|
||||||
|
S_IWUSR = 0x80
|
||||||
|
S_IXGRP = 0x8
|
||||||
|
S_IXOTH = 0x1
|
||||||
|
S_IXUSR = 0x40
|
||||||
TAB0 = 0x0
|
TAB0 = 0x0
|
||||||
TAB1 = 0x800
|
TAB1 = 0x800
|
||||||
TAB2 = 0x1000
|
TAB2 = 0x1000
|
||||||
@@ -1102,6 +1135,8 @@ const (
|
|||||||
TIOCSTOP = 0x746f
|
TIOCSTOP = 0x746f
|
||||||
TIOCSWINSZ = 0x5467
|
TIOCSWINSZ = 0x5467
|
||||||
TOSTOP = 0x100
|
TOSTOP = 0x100
|
||||||
|
UTIME_NOW = -0x1
|
||||||
|
UTIME_OMIT = -0x2
|
||||||
VCEOF = 0x8
|
VCEOF = 0x8
|
||||||
VCEOL = 0x9
|
VCEOL = 0x9
|
||||||
VDISCARD = 0xd
|
VDISCARD = 0xd
|
||||||
|
|||||||
@@ -75,23 +75,6 @@ type Rlimit struct {
|
|||||||
|
|
||||||
type _Gid_t uint32
|
type _Gid_t uint32
|
||||||
|
|
||||||
const (
|
|
||||||
S_IFMT = 0xf000
|
|
||||||
S_IFIFO = 0x1000
|
|
||||||
S_IFCHR = 0x2000
|
|
||||||
S_IFDIR = 0x4000
|
|
||||||
S_IFBLK = 0x6000
|
|
||||||
S_IFREG = 0x8000
|
|
||||||
S_IFLNK = 0xa000
|
|
||||||
S_IFSOCK = 0xc000
|
|
||||||
S_ISUID = 0x800
|
|
||||||
S_ISGID = 0x400
|
|
||||||
S_ISVTX = 0x200
|
|
||||||
S_IRUSR = 0x100
|
|
||||||
S_IWUSR = 0x80
|
|
||||||
S_IXUSR = 0x40
|
|
||||||
)
|
|
||||||
|
|
||||||
type Stat_t struct {
|
type Stat_t struct {
|
||||||
Dev uint64
|
Dev uint64
|
||||||
Ino uint64
|
Ino uint64
|
||||||
|
|||||||
Reference in New Issue
Block a user