mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-02 15:17:31 -04:00
unix: add additional file mode bit constants from sys/stat.h on DragonflyBSD
Also generate the constants using mkerror.sh instead of having to list each of them manually in types_dragonfly.go Change-Id: I89b933834be6aa0eeec3d5ddbbf610e693b29327 Reviewed-on: https://go-review.googlesource.com/129316 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
14742f9018
commit
871208d995
@@ -65,6 +65,7 @@ includes_DragonFly='
|
|||||||
#include <sys/event.h>
|
#include <sys/event.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/sockio.h>
|
#include <sys/sockio.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|||||||
@@ -100,23 +100,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 Statfs_t C.struct_statfs
|
type Statfs_t C.struct_statfs
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
// +build amd64,dragonfly
|
// +build amd64,dragonfly
|
||||||
|
|
||||||
// Created by cgo -godefs - DO NOT EDIT
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -m64 _const.go
|
// cgo -godefs -- -m64 _const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
@@ -1168,6 +1168,36 @@ const (
|
|||||||
SO_TIMESTAMP = 0x400
|
SO_TIMESTAMP = 0x400
|
||||||
SO_TYPE = 0x1008
|
SO_TYPE = 0x1008
|
||||||
SO_USELOOPBACK = 0x40
|
SO_USELOOPBACK = 0x40
|
||||||
|
S_BLKSIZE = 0x200
|
||||||
|
S_IEXEC = 0x40
|
||||||
|
S_IFBLK = 0x6000
|
||||||
|
S_IFCHR = 0x2000
|
||||||
|
S_IFDB = 0x9000
|
||||||
|
S_IFDIR = 0x4000
|
||||||
|
S_IFIFO = 0x1000
|
||||||
|
S_IFLNK = 0xa000
|
||||||
|
S_IFMT = 0xf000
|
||||||
|
S_IFREG = 0x8000
|
||||||
|
S_IFSOCK = 0xc000
|
||||||
|
S_IFWHT = 0xe000
|
||||||
|
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_ISTXT = 0x200
|
||||||
|
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
|
||||||
TCIFLUSH = 0x1
|
TCIFLUSH = 0x1
|
||||||
TCIOFF = 0x3
|
TCIOFF = 0x3
|
||||||
TCIOFLUSH = 0x3
|
TCIOFLUSH = 0x3
|
||||||
|
|||||||
@@ -56,23 +56,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 {
|
||||||
Ino uint64
|
Ino uint64
|
||||||
Nlink uint32
|
Nlink uint32
|
||||||
|
|||||||
Reference in New Issue
Block a user