From 4e7049bb848e2e7de7ee8c187cf272ca0c0d5a38 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Thu, 6 Mar 2014 00:09:09 +1100 Subject: [PATCH] syscall: regenerate z-files for dragonfly Regenerate z-files for DragonFly BSD 3.6. F_DUP_FD_CLOEXEC is now supported, so remove the zero value constant from types_dragonfly.go so that we use the generated value from the z-files. LGTM=mikioh.mikioh R=golang-codereviews, mikioh.mikioh CC=golang-codereviews https://golang.org/cl/70080047 --- src/pkg/syscall/types_dragonfly.go | 4 ---- src/pkg/syscall/zerrors_dragonfly_386.go | 5 ++++- src/pkg/syscall/zerrors_dragonfly_amd64.go | 5 ++++- src/pkg/syscall/zsysnum_dragonfly_386.go | 5 ++--- src/pkg/syscall/zsysnum_dragonfly_amd64.go | 5 ++--- src/pkg/syscall/ztypes_dragonfly_386.go | 4 ---- src/pkg/syscall/ztypes_dragonfly_amd64.go | 4 ---- 7 files changed, 12 insertions(+), 20 deletions(-) diff --git a/src/pkg/syscall/types_dragonfly.go b/src/pkg/syscall/types_dragonfly.go index baed2911fcf..fb7fd1bb4fd 100644 --- a/src/pkg/syscall/types_dragonfly.go +++ b/src/pkg/syscall/types_dragonfly.go @@ -98,10 +98,6 @@ type _Gid_t C.gid_t // Files -const ( - F_DUPFD_CLOEXEC = 0 // not supported -) - const ( // Directory mode bits S_IFMT = C.S_IFMT S_IFIFO = C.S_IFIFO diff --git a/src/pkg/syscall/zerrors_dragonfly_386.go b/src/pkg/syscall/zerrors_dragonfly_386.go index a2eb926ee3b..701a1c38118 100644 --- a/src/pkg/syscall/zerrors_dragonfly_386.go +++ b/src/pkg/syscall/zerrors_dragonfly_386.go @@ -311,7 +311,10 @@ const ( FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 FLUSHO = 0x800000 + F_DUP2FD = 0xa + F_DUP2FD_CLOEXEC = 0x12 F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x11 F_GETFD = 0x1 F_GETFL = 0x3 F_GETLK = 0x7 @@ -1475,7 +1478,7 @@ var errors = [...]string{ 90: "multihop attempted", 91: "link has been severed", 92: "protocol error", - 93: "unknown error: 93", + 93: "no medium found", 94: "unknown error: 94", 95: "unknown error: 95", 96: "unknown error: 96", diff --git a/src/pkg/syscall/zerrors_dragonfly_amd64.go b/src/pkg/syscall/zerrors_dragonfly_amd64.go index d2fe97c68f0..59bff751cb9 100644 --- a/src/pkg/syscall/zerrors_dragonfly_amd64.go +++ b/src/pkg/syscall/zerrors_dragonfly_amd64.go @@ -311,7 +311,10 @@ const ( FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 FLUSHO = 0x800000 + F_DUP2FD = 0xa + F_DUP2FD_CLOEXEC = 0x12 F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x11 F_GETFD = 0x1 F_GETFL = 0x3 F_GETLK = 0x7 @@ -1475,7 +1478,7 @@ var errors = [...]string{ 90: "multihop attempted", 91: "link has been severed", 92: "protocol error", - 93: "unknown error: 93", + 93: "no medium found", 94: "unknown error: 94", 95: "unknown error: 95", 96: "unknown error: 96", diff --git a/src/pkg/syscall/zsysnum_dragonfly_386.go b/src/pkg/syscall/zsysnum_dragonfly_386.go index 68eeb32acab..4b086b9214a 100644 --- a/src/pkg/syscall/zsysnum_dragonfly_386.go +++ b/src/pkg/syscall/zsysnum_dragonfly_386.go @@ -115,9 +115,6 @@ const ( SYS_UNAME = 164 // { int uname(struct utsname *name); } SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \ - SYS_SEMSYS = 169 // { int semsys(int which, int a2, int a3, int a4, \ - SYS_MSGSYS = 170 // { int msgsys(int which, int a2, int a3, int a4, \ - SYS_SHMSYS = 171 // { int shmsys(int which, int a2, int a3, int a4); } SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, \ SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, \ SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); } @@ -300,4 +297,6 @@ const ( SYS_LINKAT = 531 // { int linkat(int fd1, char *path1, int fd2, \ SYS_EACCESS = 532 // { int eaccess(char *path, int flags); } SYS_LPATHCONF = 533 // { int lpathconf(char *path, int name); } + SYS_VMM_GUEST_CTL = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); } + SYS_VMM_GUEST_SYNC_ADDR = 535 // { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); } ) diff --git a/src/pkg/syscall/zsysnum_dragonfly_amd64.go b/src/pkg/syscall/zsysnum_dragonfly_amd64.go index 68eeb32acab..4b086b9214a 100644 --- a/src/pkg/syscall/zsysnum_dragonfly_amd64.go +++ b/src/pkg/syscall/zsysnum_dragonfly_amd64.go @@ -115,9 +115,6 @@ const ( SYS_UNAME = 164 // { int uname(struct utsname *name); } SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \ - SYS_SEMSYS = 169 // { int semsys(int which, int a2, int a3, int a4, \ - SYS_MSGSYS = 170 // { int msgsys(int which, int a2, int a3, int a4, \ - SYS_SHMSYS = 171 // { int shmsys(int which, int a2, int a3, int a4); } SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, \ SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, \ SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); } @@ -300,4 +297,6 @@ const ( SYS_LINKAT = 531 // { int linkat(int fd1, char *path1, int fd2, \ SYS_EACCESS = 532 // { int eaccess(char *path, int flags); } SYS_LPATHCONF = 533 // { int lpathconf(char *path, int name); } + SYS_VMM_GUEST_CTL = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); } + SYS_VMM_GUEST_SYNC_ADDR = 535 // { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); } ) diff --git a/src/pkg/syscall/ztypes_dragonfly_386.go b/src/pkg/syscall/ztypes_dragonfly_386.go index 590d88328d6..6b6ec152570 100644 --- a/src/pkg/syscall/ztypes_dragonfly_386.go +++ b/src/pkg/syscall/ztypes_dragonfly_386.go @@ -54,10 +54,6 @@ type Rlimit struct { type _Gid_t uint32 -const ( - F_DUPFD_CLOEXEC = 0 -) - const ( S_IFMT = 0xf000 S_IFIFO = 0x1000 diff --git a/src/pkg/syscall/ztypes_dragonfly_amd64.go b/src/pkg/syscall/ztypes_dragonfly_amd64.go index a543b7c99ac..954ffd7ab28 100644 --- a/src/pkg/syscall/ztypes_dragonfly_amd64.go +++ b/src/pkg/syscall/ztypes_dragonfly_amd64.go @@ -54,10 +54,6 @@ type Rlimit struct { type _Gid_t uint32 -const ( - F_DUPFD_CLOEXEC = 0 -) - const ( S_IFMT = 0xf000 S_IFIFO = 0x1000