From: Joel Sing Date: Sat, 11 Jan 2014 08:00:32 +0000 (+1100) Subject: runtime, syscall: update for openbsd system ABI break X-Git-Tag: go1.3beta1~1004 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=471763f657df9bfe34c40d8483e0dd4b9c4122a6;p=gostls13.git runtime, syscall: update for openbsd system ABI break Update Go so that it continues to work past the OpenBSD system ABI break, with 64-bit time_t: http://www.openbsd.org/faq/current.html#20130813 Note: this makes OpenBSD 5.5 (currently 5.4-current) the minimum supported release for Go. Fixes #7049. R=golang-codereviews, mikioh.mikioh CC=golang-codereviews https://golang.org/cl/13368046 --- diff --git a/src/pkg/runtime/defs_openbsd_386.h b/src/pkg/runtime/defs_openbsd_386.h index a5b7f04b5b..b8f993e2b8 100644 --- a/src/pkg/runtime/defs_openbsd_386.h +++ b/src/pkg/runtime/defs_openbsd_386.h @@ -121,7 +121,7 @@ struct Sigcontext { int32 sc_eflags; int32 sc_esp; int32 sc_ss; - int32 sc_onstack; + int32 __sc_unused; int32 sc_mask; int32 sc_trapno; int32 sc_err; @@ -143,11 +143,11 @@ struct StackT { }; struct Timespec { - int32 tv_sec; + int64 tv_sec; int32 tv_nsec; }; struct Timeval { - int32 tv_sec; + int64 tv_sec; int32 tv_usec; }; struct Itimerval { @@ -160,7 +160,7 @@ struct Kevent { int16 filter; uint16 flags; uint32 fflags; - int32 data; + int64 data; byte *udata; }; diff --git a/src/pkg/runtime/defs_openbsd_amd64.h b/src/pkg/runtime/defs_openbsd_amd64.h index eb47ec8927..a1ae2ef65c 100644 --- a/src/pkg/runtime/defs_openbsd_amd64.h +++ b/src/pkg/runtime/defs_openbsd_amd64.h @@ -133,7 +133,7 @@ struct Sigcontext { int64 sc_rsp; int64 sc_ss; void *sc_fpstate; - int32 sc_onstack; + int32 __sc_unused; int32 sc_mask; }; struct Siginfo { @@ -154,8 +154,7 @@ struct StackT { }; struct Timespec { - int32 tv_sec; - byte Pad_cgo_0[4]; + int64 tv_sec; int64 tv_nsec; }; struct Timeval { @@ -168,11 +167,11 @@ struct Itimerval { }; struct Kevent { - uint32 ident; + uint64 ident; int16 filter; uint16 flags; uint32 fflags; - int32 data; + int64 data; byte *udata; }; diff --git a/src/pkg/runtime/sys_openbsd_386.s b/src/pkg/runtime/sys_openbsd_386.s index e1ec5337ae..d911e85c53 100644 --- a/src/pkg/runtime/sys_openbsd_386.s +++ b/src/pkg/runtime/sys_openbsd_386.s @@ -45,21 +45,22 @@ TEXT runtime·write(SB),NOSPLIT,$-4 INT $0x80 RET -TEXT runtime·usleep(SB),NOSPLIT,$20 +TEXT runtime·usleep(SB),NOSPLIT,$24 MOVL $0, DX MOVL usec+0(FP), AX MOVL $1000000, CX DIVL CX - MOVL AX, 12(SP) // tv_sec + MOVL AX, 12(SP) // tv_sec - l32 + MOVL $0, 16(SP) // tv_sec - h32 MOVL $1000, AX MULL DX - MOVL AX, 16(SP) // tv_nsec + MOVL AX, 20(SP) // tv_nsec MOVL $0, 0(SP) LEAL 12(SP), AX MOVL AX, 4(SP) // arg 1 - rqtp MOVL $0, 8(SP) // arg 2 - rmtp - MOVL $240, AX // sys_nanosleep + MOVL $91, AX // sys_nanosleep INT $0x80 RET @@ -107,43 +108,46 @@ TEXT runtime·madvise(SB),NOSPLIT,$-4 RET TEXT runtime·setitimer(SB),NOSPLIT,$-4 - MOVL $83, AX + MOVL $69, AX INT $0x80 RET // func now() (sec int64, nsec int32) TEXT time·now(SB), NOSPLIT, $32 - MOVL $232, AX LEAL 12(SP), BX - MOVL $0, 4(SP) - MOVL BX, 8(SP) + MOVL $0, 4(SP) // arg 1 - clock_id + MOVL BX, 8(SP) // arg 2 - tp + MOVL $87, AX // sys_clock_gettime INT $0x80 - MOVL 12(SP), AX // sec - MOVL 16(SP), BX // nsec - // sec is in AX, nsec in BX + MOVL 12(SP), AX // sec - l32 MOVL AX, sec+0(FP) - MOVL $0, sec+4(FP) + MOVL 16(SP), AX // sec - h32 + MOVL AX, sec+4(FP) + + MOVL 20(SP), BX // nsec MOVL BX, nsec+8(FP) RET // int64 nanotime(void) so really // void nanotime(int64 *nsec) TEXT runtime·nanotime(SB),NOSPLIT,$32 - MOVL $232, AX LEAL 12(SP), BX - MOVL $0, 4(SP) - MOVL BX, 8(SP) + MOVL $0, 4(SP) // arg 1 - clock_id + MOVL BX, 8(SP) // arg 2 - tp + MOVL $87, AX // sys_clock_gettime INT $0x80 - MOVL 12(SP), AX // sec - MOVL 16(SP), BX // nsec - // sec is in AX, nsec in BX - // convert to DX:AX nsec - MOVL $1000000000, CX - MULL CX + MOVL 16(SP), CX // sec - h32 + IMULL $1000000000, CX + + MOVL 12(SP), AX // sec - l32 + MOVL $1000000000, BX + MULL BX // result in dx:ax + + MOVL 20(SP), BX // nsec ADDL BX, AX - ADCL $0, DX + ADCL CX, DX // add high bits with carry MOVL ret+0(FP), DI MOVL AX, 0(DI) @@ -325,7 +329,7 @@ TEXT runtime·osyield(SB),NOSPLIT,$-4 RET TEXT runtime·thrsleep(SB),NOSPLIT,$-4 - MOVL $300, AX // sys___thrsleep + MOVL $94, AX // sys___thrsleep INT $0x80 RET @@ -362,7 +366,7 @@ TEXT runtime·kqueue(SB),NOSPLIT,$0 // int32 runtime·kevent(int kq, Kevent *changelist, int nchanges, Kevent *eventlist, int nevents, Timespec *timeout); TEXT runtime·kevent(SB),NOSPLIT,$0 - MOVL $270, AX + MOVL $72, AX // sys_kevent INT $0x80 JAE 2(PC) NEGL AX @@ -370,7 +374,7 @@ TEXT runtime·kevent(SB),NOSPLIT,$0 // int32 runtime·closeonexec(int32 fd); TEXT runtime·closeonexec(SB),NOSPLIT,$32 - MOVL $92, AX // fcntl + MOVL $92, AX // sys_fcntl // 0(SP) is where the caller PC would be; kernel skips it MOVL fd+0(FP), BX MOVL BX, 4(SP) // fd diff --git a/src/pkg/runtime/sys_openbsd_amd64.s b/src/pkg/runtime/sys_openbsd_amd64.s index 26dc61f716..e5b7b01206 100644 --- a/src/pkg/runtime/sys_openbsd_amd64.s +++ b/src/pkg/runtime/sys_openbsd_amd64.s @@ -62,7 +62,7 @@ TEXT runtime·thrsleep(SB),NOSPLIT,$0 MOVQ 24(SP), DX // arg 3 - tp MOVQ 32(SP), R10 // arg 4 - lock MOVQ 40(SP), R8 // arg 5 - abort - MOVL $300, AX // sys___thrsleep + MOVL $94, AX // sys___thrsleep SYSCALL RET @@ -130,7 +130,7 @@ TEXT runtime·usleep(SB),NOSPLIT,$16 MOVQ SP, DI // arg 1 - rqtp MOVQ $0, SI // arg 2 - rmtp - MOVL $240, AX // sys_nanosleep + MOVL $91, AX // sys_nanosleep SYSCALL RET @@ -138,7 +138,7 @@ TEXT runtime·raise(SB),NOSPLIT,$16 MOVL $299, AX // sys_getthrid SYSCALL MOVQ AX, DI // arg 1 - pid - MOVL sig+0(FP), SI // arg 2 - signum + MOVL sig+0(FP), SI // arg 2 - signum MOVL $37, AX // sys_kill SYSCALL RET @@ -147,7 +147,7 @@ TEXT runtime·setitimer(SB),NOSPLIT,$-8 MOVL 8(SP), DI // arg 1 - which MOVQ 16(SP), SI // arg 2 - itv MOVQ 24(SP), DX // arg 3 - oitv - MOVL $83, AX // sys_setitimer + MOVL $69, AX // sys_setitimer SYSCALL RET @@ -155,9 +155,9 @@ TEXT runtime·setitimer(SB),NOSPLIT,$-8 TEXT time·now(SB), NOSPLIT, $32 MOVQ $0, DI // arg 1 - clock_id LEAQ 8(SP), SI // arg 2 - tp - MOVL $232, AX // sys_clock_gettime + MOVL $87, AX // sys_clock_gettime SYSCALL - MOVL 8(SP), AX // sec + MOVQ 8(SP), AX // sec MOVQ 16(SP), DX // nsec // sec is in AX, nsec in DX @@ -168,9 +168,9 @@ TEXT time·now(SB), NOSPLIT, $32 TEXT runtime·nanotime(SB),NOSPLIT,$24 MOVQ $0, DI // arg 1 - clock_id LEAQ 8(SP), SI // arg 2 - tp - MOVL $232, AX // sys_clock_gettime + MOVL $87, AX // sys_clock_gettime SYSCALL - MOVL 8(SP), AX // sec + MOVQ 8(SP), AX // sec MOVQ 16(SP), DX // nsec // sec is in AX, nsec in DX @@ -318,7 +318,7 @@ TEXT runtime·kevent(SB),NOSPLIT,$0 MOVQ 32(SP), R10 MOVL 40(SP), R8 MOVQ 48(SP), R9 - MOVL $270, AX + MOVL $72, AX SYSCALL JCC 2(PC) NEGQ AX diff --git a/src/pkg/syscall/syscall_openbsd.go b/src/pkg/syscall/syscall_openbsd.go index 89c73215a0..a5b87ab31b 100644 --- a/src/pkg/syscall/syscall_openbsd.go +++ b/src/pkg/syscall/syscall_openbsd.go @@ -90,6 +90,11 @@ func Pipe(p []int) (err error) { return } +//sys getdents(fd int, buf []byte) (n int, err error) +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + return getdents(fd, buf) +} + // TODO func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { return -1, ENOSYS @@ -119,7 +124,6 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys Fstatfs(fd int, stat *Statfs_t) (err error) //sys Fsync(fd int) (err error) //sys Ftruncate(fd int, length int64) (err error) -//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) //sysnb Getegid() (egid int) //sysnb Geteuid() (uid int) //sys Getfsstat(buf []Statfs_t, flags int) (n int, err error) diff --git a/src/pkg/syscall/syscall_openbsd_386.go b/src/pkg/syscall/syscall_openbsd_386.go index 3c4c693c97..ad5ae14bf8 100644 --- a/src/pkg/syscall/syscall_openbsd_386.go +++ b/src/pkg/syscall/syscall_openbsd_386.go @@ -9,7 +9,7 @@ func Getpagesize() int { return 4096 } func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { - ts.Sec = int32(nsec / 1e9) + ts.Sec = int64(nsec / 1e9) ts.Nsec = int32(nsec % 1e9) return } @@ -19,7 +19,7 @@ func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec) func NsecToTimeval(nsec int64) (tv Timeval) { nsec += 999 // round up to microsecond tv.Usec = int32(nsec % 1e9 / 1e3) - tv.Sec = int32(nsec / 1e9) + tv.Sec = int64(nsec / 1e9) return } diff --git a/src/pkg/syscall/syscall_openbsd_amd64.go b/src/pkg/syscall/syscall_openbsd_amd64.go index c356ad4faa..6181344cdc 100644 --- a/src/pkg/syscall/syscall_openbsd_amd64.go +++ b/src/pkg/syscall/syscall_openbsd_amd64.go @@ -9,7 +9,7 @@ func Getpagesize() int { return 4096 } func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { - ts.Sec = int32(nsec / 1e9) + ts.Sec = nsec / 1e9 ts.Nsec = nsec % 1e9 return } @@ -19,12 +19,12 @@ func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec) func NsecToTimeval(nsec int64) (tv Timeval) { nsec += 999 // round up to microsecond tv.Usec = nsec % 1e9 / 1e3 - tv.Sec = int64(nsec / 1e9) + tv.Sec = nsec / 1e9 return } func SetKevent(k *Kevent_t, fd, mode, flags int) { - k.Ident = uint32(fd) + k.Ident = uint64(fd) k.Filter = int16(mode) k.Flags = uint16(flags) } diff --git a/src/pkg/syscall/zerrors_openbsd_386.go b/src/pkg/syscall/zerrors_openbsd_386.go index e546243b07..4c9c357573 100644 --- a/src/pkg/syscall/zerrors_openbsd_386.go +++ b/src/pkg/syscall/zerrors_openbsd_386.go @@ -77,7 +77,7 @@ const ( BIOCGFILDROP = 0x40044278 BIOCGHDRCMPLT = 0x40044274 BIOCGRSIG = 0x40044273 - BIOCGRTIMEOUT = 0x4008426e + BIOCGRTIMEOUT = 0x400c426e BIOCGSTATS = 0x4008426f BIOCIMMEDIATE = 0x80044270 BIOCLOCK = 0x20004276 @@ -91,7 +91,7 @@ const ( BIOCSFILDROP = 0x80044279 BIOCSHDRCMPLT = 0x80044275 BIOCSRSIG = 0x80044272 - BIOCSRTIMEOUT = 0x8008426d + BIOCSRTIMEOUT = 0x800c426d BIOCVERSION = 0x40044271 BPF_A = 0x10 BPF_ABS = 0x20 @@ -197,8 +197,6 @@ const ( ECHONL = 0x10 ECHOPRT = 0x20 EMT_TAGOVF = 0x1 - EMUL_ENABLED = 0x1 - EMUL_NATIVE = 0x2 ENDRUNDISC = 0x9 ETHERMIN = 0x2e ETHERMTU = 0x5dc @@ -444,7 +442,6 @@ const ( IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 0x1 - IFA_ROUTE = 0x1 IFF_ALLMULTI = 0x200 IFF_BROADCAST = 0x2 IFF_CANTCHANGE = 0x8e52 @@ -713,6 +710,8 @@ const ( IPPROTO_AH = 0x33 IPPROTO_CARP = 0x70 IPPROTO_DIVERT = 0x102 + IPPROTO_DIVERT_INIT = 0x2 + IPPROTO_DIVERT_RESP = 0x1 IPPROTO_DONE = 0x101 IPPROTO_DSTOPTS = 0x3c IPPROTO_EGP = 0x8 @@ -757,7 +756,6 @@ const ( IPV6_DSTOPTS = 0x32 IPV6_ESP_NETWORK_LEVEL = 0x37 IPV6_ESP_TRANS_LEVEL = 0x36 - IPV6_FAITH = 0x1d IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 IPV6_FRAGTTL = 0x78 @@ -774,7 +772,6 @@ const ( IPV6_MULTICAST_IF = 0x9 IPV6_MULTICAST_LOOP = 0xb IPV6_NEXTHOP = 0x30 - IPV6_OPTIONS = 0x1 IPV6_PATHMTU = 0x2c IPV6_PIPEX = 0x3f IPV6_PKTINFO = 0x2e @@ -783,6 +780,7 @@ const ( IPV6_PORTRANGE_HIGH = 0x1 IPV6_PORTRANGE_LOW = 0x2 IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVDSTPORT = 0x40 IPV6_RECVHOPLIMIT = 0x25 IPV6_RECVHOPOPTS = 0x27 IPV6_RECVPATHMTU = 0x2b @@ -793,9 +791,7 @@ const ( IPV6_RTHDR = 0x33 IPV6_RTHDRDSTOPTS = 0x23 IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 IPV6_TCLASS = 0x3d IPV6_UNICAST_HOPS = 0x4 IPV6_USE_MIN_MTU = 0x2a @@ -807,6 +803,7 @@ const ( IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 + IP_DIVERTFL = 0x1022 IP_DROP_MEMBERSHIP = 0xd IP_ESP_NETWORK_LEVEL = 0x16 IP_ESP_TRANS_LEVEL = 0x15 @@ -926,10 +923,10 @@ const ( PARODD = 0x2000 PENDIN = 0x20000000 PF_FLUSH = 0x1 - PT_MASK = 0x3ff000 PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 + PT_MASK = 0x3ff000 RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 RLIMIT_DATA = 0x2 @@ -966,7 +963,7 @@ const ( RTF_CLONING = 0x100 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 - RTF_FMASK = 0xf808 + RTF_FMASK = 0x10f808 RTF_GATEWAY = 0x2 RTF_HOST = 0x4 RTF_LLINFO = 0x400 @@ -1001,7 +998,7 @@ const ( RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb RTM_RTTUNIT = 0xf4240 - RTM_VERSION = 0x4 + RTM_VERSION = 0x5 RTV_EXPIRE = 0x4 RTV_HOPCOUNT = 0x2 RTV_MTU = 0x1 @@ -1027,7 +1024,7 @@ const ( SIOCBRDGADD = 0x8054693c SIOCBRDGADDS = 0x80546941 SIOCBRDGARL = 0x806e694d - SIOCBRDGDADDR = 0x80286947 + SIOCBRDGDADDR = 0x81286947 SIOCBRDGDEL = 0x8054693d SIOCBRDGDELS = 0x80546942 SIOCBRDGFLUSH = 0x80546948 @@ -1037,14 +1034,14 @@ const ( SIOCBRDGGHT = 0xc0146951 SIOCBRDGGIFFLGS = 0xc054693e SIOCBRDGGMA = 0xc0146953 - SIOCBRDGGPARAM = 0xc0386958 + SIOCBRDGGPARAM = 0xc03c6958 SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGRL = 0xc028694f SIOCBRDGGSIFS = 0xc054693c SIOCBRDGGTO = 0xc0146946 SIOCBRDGIFS = 0xc0546942 SIOCBRDGRTS = 0xc0186943 - SIOCBRDGSADDR = 0xc0286944 + SIOCBRDGSADDR = 0xc1286944 SIOCBRDGSCACHE = 0x80146940 SIOCBRDGSFD = 0x80146952 SIOCBRDGSHT = 0x80146951 @@ -1067,6 +1064,7 @@ const ( SIOCGETPFSYNC = 0xc02069f8 SIOCGETSGCNT = 0xc0147534 SIOCGETVIFCNT = 0xc0147533 + SIOCGETVLAN = 0xc0206990 SIOCGHIWAT = 0x40047301 SIOCGIFADDR = 0xc0206921 SIOCGIFASYNCMAP = 0xc020697c @@ -1077,9 +1075,9 @@ const ( SIOCGIFDSTADDR = 0xc0206922 SIOCGIFFLAGS = 0xc0206911 SIOCGIFGATTR = 0xc024698b - SIOCGIFGENERIC = 0xc020693a SIOCGIFGMEMB = 0xc024698a SIOCGIFGROUP = 0xc0246988 + SIOCGIFHARDMTU = 0xc02069a5 SIOCGIFMEDIA = 0xc0286936 SIOCGIFMETRIC = 0xc0206917 SIOCGIFMTU = 0xc020697e @@ -1094,9 +1092,12 @@ const ( SIOCGLIFADDR = 0xc218691d SIOCGLIFPHYADDR = 0xc218694b SIOCGLIFPHYRTABLE = 0xc02069a2 + SIOCGLIFPHYTTL = 0xc02069a9 SIOCGLOWAT = 0x40047303 SIOCGPGRP = 0x40047309 + SIOCGSPPPPARAMS = 0xc0206994 SIOCGVH = 0xc02069f6 + SIOCGVNETID = 0xc02069a7 SIOCIFCREATE = 0x8020697a SIOCIFDESTROY = 0x80206979 SIOCIFGCLONERS = 0xc00c6978 @@ -1104,6 +1105,7 @@ const ( SIOCSETLABEL = 0x80206999 SIOCSETPFLOW = 0x802069fd SIOCSETPFSYNC = 0x802069f7 + SIOCSETVLAN = 0x8020698f SIOCSHIWAT = 0x80047300 SIOCSIFADDR = 0x8020690c SIOCSIFASYNCMAP = 0x8020697d @@ -1112,7 +1114,6 @@ const ( SIOCSIFDSTADDR = 0x8020690e SIOCSIFFLAGS = 0x80206910 SIOCSIFGATTR = 0x8024698c - SIOCSIFGENERIC = 0x80206939 SIOCSIFLLADDR = 0x8020691f SIOCSIFMEDIA = 0xc0206935 SIOCSIFMETRIC = 0x80206918 @@ -1126,9 +1127,12 @@ const ( SIOCSIFXFLAGS = 0x8020699d SIOCSLIFPHYADDR = 0x8218694a SIOCSLIFPHYRTABLE = 0x802069a1 + SIOCSLIFPHYTTL = 0x802069a8 SIOCSLOWAT = 0x80047302 SIOCSPGRP = 0x80047308 + SIOCSSPPPPARAMS = 0x80206993 SIOCSVH = 0xc02069f5 + SIOCSVNETID = 0x802069a6 SOCK_DGRAM = 0x2 SOCK_RAW = 0x3 SOCK_RDM = 0x4 @@ -1171,6 +1175,7 @@ const ( TCP_MD5SIG = 0x4 TCP_MSS = 0x200 TCP_NODELAY = 0x1 + TCP_NOPUSH = 0x10 TCP_NSTATES = 0xb TCP_SACK_ENABLE = 0x8 TCSAFLUSH = 0x2 @@ -1190,7 +1195,7 @@ const ( TIOCGETD = 0x4004741a TIOCGFLAGS = 0x4004745d TIOCGPGRP = 0x40047477 - TIOCGTSTAMP = 0x4008745b + TIOCGTSTAMP = 0x400c745b TIOCGWINSZ = 0x40087468 TIOCMBIC = 0x8004746b TIOCMBIS = 0x8004746c diff --git a/src/pkg/syscall/zerrors_openbsd_amd64.go b/src/pkg/syscall/zerrors_openbsd_amd64.go index 411b51a68c..c480bab973 100644 --- a/src/pkg/syscall/zerrors_openbsd_amd64.go +++ b/src/pkg/syscall/zerrors_openbsd_amd64.go @@ -140,10 +140,8 @@ const ( BPF_W = 0x0 BPF_X = 0x8 BRKINT = 0x2 - CCR0_FLUSH = 0x10 CFLUSH = 0xf CLOCAL = 0x8000 - CPUID_CFLUSH = 0x80000 CREAD = 0x800 CS5 = 0x0 CS6 = 0x100 @@ -198,13 +196,7 @@ const ( ECHOKE = 0x1 ECHONL = 0x10 ECHOPRT = 0x20 - EFER_LMA = 0x400 - EFER_LME = 0x100 - EFER_NXE = 0x800 - EFER_SCE = 0x1 EMT_TAGOVF = 0x1 - EMUL_ENABLED = 0x1 - EMUL_NATIVE = 0x2 ENDRUNDISC = 0x9 ETHERMIN = 0x2e ETHERMTU = 0x5dc @@ -450,7 +442,6 @@ const ( IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 0x1 - IFA_ROUTE = 0x1 IFF_ALLMULTI = 0x200 IFF_BROADCAST = 0x2 IFF_CANTCHANGE = 0x8e52 @@ -719,6 +710,8 @@ const ( IPPROTO_AH = 0x33 IPPROTO_CARP = 0x70 IPPROTO_DIVERT = 0x102 + IPPROTO_DIVERT_INIT = 0x2 + IPPROTO_DIVERT_RESP = 0x1 IPPROTO_DONE = 0x101 IPPROTO_DSTOPTS = 0x3c IPPROTO_EGP = 0x8 @@ -763,7 +756,6 @@ const ( IPV6_DSTOPTS = 0x32 IPV6_ESP_NETWORK_LEVEL = 0x37 IPV6_ESP_TRANS_LEVEL = 0x36 - IPV6_FAITH = 0x1d IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 IPV6_FRAGTTL = 0x78 @@ -780,7 +772,6 @@ const ( IPV6_MULTICAST_IF = 0x9 IPV6_MULTICAST_LOOP = 0xb IPV6_NEXTHOP = 0x30 - IPV6_OPTIONS = 0x1 IPV6_PATHMTU = 0x2c IPV6_PIPEX = 0x3f IPV6_PKTINFO = 0x2e @@ -789,6 +780,7 @@ const ( IPV6_PORTRANGE_HIGH = 0x1 IPV6_PORTRANGE_LOW = 0x2 IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVDSTPORT = 0x40 IPV6_RECVHOPLIMIT = 0x25 IPV6_RECVHOPOPTS = 0x27 IPV6_RECVPATHMTU = 0x2b @@ -799,9 +791,7 @@ const ( IPV6_RTHDR = 0x33 IPV6_RTHDRDSTOPTS = 0x23 IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 IPV6_TCLASS = 0x3d IPV6_UNICAST_HOPS = 0x4 IPV6_USE_MIN_MTU = 0x2a @@ -813,6 +803,7 @@ const ( IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 + IP_DIVERTFL = 0x1022 IP_DROP_MEMBERSHIP = 0xd IP_ESP_NETWORK_LEVEL = 0x16 IP_ESP_TRANS_LEVEL = 0x15 @@ -932,7 +923,6 @@ const ( PARODD = 0x2000 PENDIN = 0x20000000 PF_FLUSH = 0x1 - PMC5_PIPELINE_FLUSH = 0x15 PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 @@ -972,7 +962,7 @@ const ( RTF_CLONING = 0x100 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 - RTF_FMASK = 0xf808 + RTF_FMASK = 0x10f808 RTF_GATEWAY = 0x2 RTF_HOST = 0x4 RTF_LLINFO = 0x400 @@ -1007,7 +997,7 @@ const ( RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb RTM_RTTUNIT = 0xf4240 - RTM_VERSION = 0x4 + RTM_VERSION = 0x5 RTV_EXPIRE = 0x4 RTV_HOPCOUNT = 0x2 RTV_MTU = 0x1 @@ -1033,7 +1023,7 @@ const ( SIOCBRDGADD = 0x8058693c SIOCBRDGADDS = 0x80586941 SIOCBRDGARL = 0x806e694d - SIOCBRDGDADDR = 0x80286947 + SIOCBRDGDADDR = 0x81286947 SIOCBRDGDEL = 0x8058693d SIOCBRDGDELS = 0x80586942 SIOCBRDGFLUSH = 0x80586948 @@ -1050,7 +1040,7 @@ const ( SIOCBRDGGTO = 0xc0146946 SIOCBRDGIFS = 0xc0586942 SIOCBRDGRTS = 0xc0206943 - SIOCBRDGSADDR = 0xc0286944 + SIOCBRDGSADDR = 0xc1286944 SIOCBRDGSCACHE = 0x80146940 SIOCBRDGSFD = 0x80146952 SIOCBRDGSHT = 0x80146951 @@ -1073,6 +1063,7 @@ const ( SIOCGETPFSYNC = 0xc02069f8 SIOCGETSGCNT = 0xc0207534 SIOCGETVIFCNT = 0xc0287533 + SIOCGETVLAN = 0xc0206990 SIOCGHIWAT = 0x40047301 SIOCGIFADDR = 0xc0206921 SIOCGIFASYNCMAP = 0xc020697c @@ -1083,9 +1074,9 @@ const ( SIOCGIFDSTADDR = 0xc0206922 SIOCGIFFLAGS = 0xc0206911 SIOCGIFGATTR = 0xc028698b - SIOCGIFGENERIC = 0xc020693a SIOCGIFGMEMB = 0xc028698a SIOCGIFGROUP = 0xc0286988 + SIOCGIFHARDMTU = 0xc02069a5 SIOCGIFMEDIA = 0xc0306936 SIOCGIFMETRIC = 0xc0206917 SIOCGIFMTU = 0xc020697e @@ -1100,9 +1091,12 @@ const ( SIOCGLIFADDR = 0xc218691d SIOCGLIFPHYADDR = 0xc218694b SIOCGLIFPHYRTABLE = 0xc02069a2 + SIOCGLIFPHYTTL = 0xc02069a9 SIOCGLOWAT = 0x40047303 SIOCGPGRP = 0x40047309 + SIOCGSPPPPARAMS = 0xc0206994 SIOCGVH = 0xc02069f6 + SIOCGVNETID = 0xc02069a7 SIOCIFCREATE = 0x8020697a SIOCIFDESTROY = 0x80206979 SIOCIFGCLONERS = 0xc0106978 @@ -1110,6 +1104,7 @@ const ( SIOCSETLABEL = 0x80206999 SIOCSETPFLOW = 0x802069fd SIOCSETPFSYNC = 0x802069f7 + SIOCSETVLAN = 0x8020698f SIOCSHIWAT = 0x80047300 SIOCSIFADDR = 0x8020690c SIOCSIFASYNCMAP = 0x8020697d @@ -1118,7 +1113,6 @@ const ( SIOCSIFDSTADDR = 0x8020690e SIOCSIFFLAGS = 0x80206910 SIOCSIFGATTR = 0x8028698c - SIOCSIFGENERIC = 0x80206939 SIOCSIFLLADDR = 0x8020691f SIOCSIFMEDIA = 0xc0206935 SIOCSIFMETRIC = 0x80206918 @@ -1132,9 +1126,12 @@ const ( SIOCSIFXFLAGS = 0x8020699d SIOCSLIFPHYADDR = 0x8218694a SIOCSLIFPHYRTABLE = 0x802069a1 + SIOCSLIFPHYTTL = 0x802069a8 SIOCSLOWAT = 0x80047302 SIOCSPGRP = 0x80047308 + SIOCSSPPPPARAMS = 0x80206993 SIOCSVH = 0xc02069f5 + SIOCSVNETID = 0x802069a6 SOCK_DGRAM = 0x2 SOCK_RAW = 0x3 SOCK_RDM = 0x4 @@ -1177,6 +1174,7 @@ const ( TCP_MD5SIG = 0x4 TCP_MSS = 0x200 TCP_NODELAY = 0x1 + TCP_NOPUSH = 0x10 TCP_NSTATES = 0xb TCP_SACK_ENABLE = 0x8 TCSAFLUSH = 0x2 @@ -1196,6 +1194,7 @@ const ( TIOCGETD = 0x4004741a TIOCGFLAGS = 0x4004745d TIOCGPGRP = 0x40047477 + TIOCGSID = 0x40047463 TIOCGTSTAMP = 0x4010745b TIOCGWINSZ = 0x40087468 TIOCMBIC = 0x8004746b diff --git a/src/pkg/syscall/zsyscall_openbsd_386.go b/src/pkg/syscall/zsyscall_openbsd_386.go index 2c2a56732f..3137b4bf4c 100644 --- a/src/pkg/syscall/zsyscall_openbsd_386.go +++ b/src/pkg/syscall/zsyscall_openbsd_386.go @@ -268,6 +268,23 @@ func pipe(p *[2]_C_int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -507,23 +524,6 @@ func Ftruncate(fd int, length int64) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) - n = int(r0) - if e1 != 0 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Getegid() (egid int) { r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) egid = int(r0) diff --git a/src/pkg/syscall/zsyscall_openbsd_amd64.go b/src/pkg/syscall/zsyscall_openbsd_amd64.go index 4e14706965..dfe48ce27a 100644 --- a/src/pkg/syscall/zsyscall_openbsd_amd64.go +++ b/src/pkg/syscall/zsyscall_openbsd_amd64.go @@ -268,6 +268,23 @@ func pipe(p *[2]_C_int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -507,23 +524,6 @@ func Ftruncate(fd int, length int64) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) - n = int(r0) - if e1 != 0 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Getegid() (egid int) { r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) egid = int(r0) diff --git a/src/pkg/syscall/zsysctl_openbsd.go b/src/pkg/syscall/zsysctl_openbsd.go index a5914f3f02..923b2c29fb 100644 --- a/src/pkg/syscall/zsysctl_openbsd.go +++ b/src/pkg/syscall/zsysctl_openbsd.go @@ -48,8 +48,7 @@ var sysctlMib = []mibentry{ {"kern.cp_time2", []_C_int{1, 71}}, {"kern.cryptodevallowsoft", []_C_int{1, 53}}, {"kern.domainname", []_C_int{1, 22}}, - {"kern.file", []_C_int{1, 15}}, - {"kern.file2", []_C_int{1, 73}}, + {"kern.file", []_C_int{1, 73}}, {"kern.forkstat", []_C_int{1, 42}}, {"kern.fscale", []_C_int{1, 46}}, {"kern.fsync", []_C_int{1, 33}}, @@ -87,7 +86,6 @@ var sysctlMib = []mibentry{ {"kern.proc", []_C_int{1, 66}}, {"kern.random", []_C_int{1, 31}}, {"kern.rawpartition", []_C_int{1, 24}}, - {"kern.rthreads", []_C_int{1, 74}}, {"kern.saved_ids", []_C_int{1, 20}}, {"kern.securelevel", []_C_int{1, 9}}, {"kern.seminfo", []_C_int{1, 61}}, @@ -226,8 +224,6 @@ var sysctlMib = []mibentry{ {"net.inet6.ip6.forwsrcrt", []_C_int{4, 24, 17, 5}}, {"net.inet6.ip6.hdrnestlimit", []_C_int{4, 24, 17, 15}}, {"net.inet6.ip6.hlim", []_C_int{4, 24, 17, 3}}, - {"net.inet6.ip6.kame_version", []_C_int{4, 24, 17, 20}}, - {"net.inet6.ip6.keepfaith", []_C_int{4, 24, 17, 13}}, {"net.inet6.ip6.log_interval", []_C_int{4, 24, 17, 14}}, {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}}, {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}}, @@ -236,7 +232,7 @@ var sysctlMib = []mibentry{ {"net.inet6.ip6.maxifprefixes", []_C_int{4, 24, 17, 46}}, {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}}, {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}}, - {"net.inet6.ip6.mtu", []_C_int{4, 24, 17, 4}}, + {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}}, {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}}, {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}}, {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}}, @@ -258,26 +254,6 @@ var sysctlMib = []mibentry{ {"net.mpls.ttl", []_C_int{4, 33, 2}}, {"net.pflow.stats", []_C_int{4, 34, 1}}, {"net.pipex.enable", []_C_int{4, 35, 1}}, - {"user.bc_base_max", []_C_int{8, 2}}, - {"user.bc_dim_max", []_C_int{8, 3}}, - {"user.bc_scale_max", []_C_int{8, 4}}, - {"user.bc_string_max", []_C_int{8, 5}}, - {"user.coll_weights_max", []_C_int{8, 6}}, - {"user.cs_path", []_C_int{8, 1}}, - {"user.expr_nest_max", []_C_int{8, 7}}, - {"user.line_max", []_C_int{8, 8}}, - {"user.posix2_c_bind", []_C_int{8, 11}}, - {"user.posix2_c_dev", []_C_int{8, 12}}, - {"user.posix2_char_term", []_C_int{8, 13}}, - {"user.posix2_fort_dev", []_C_int{8, 14}}, - {"user.posix2_fort_run", []_C_int{8, 15}}, - {"user.posix2_localedef", []_C_int{8, 16}}, - {"user.posix2_sw_dev", []_C_int{8, 17}}, - {"user.posix2_upe", []_C_int{8, 18}}, - {"user.posix2_version", []_C_int{8, 10}}, - {"user.re_dup_max", []_C_int{8, 9}}, - {"user.stream_max", []_C_int{8, 19}}, - {"user.tzname_max", []_C_int{8, 20}}, {"vm.anonmin", []_C_int{2, 7}}, {"vm.loadavg", []_C_int{2, 2}}, {"vm.maxslp", []_C_int{2, 10}}, diff --git a/src/pkg/syscall/zsysnum_openbsd_386.go b/src/pkg/syscall/zsysnum_openbsd_386.go index 82c98b90e6..3b9ac4c941 100644 --- a/src/pkg/syscall/zsysnum_openbsd_386.go +++ b/src/pkg/syscall/zsysnum_openbsd_386.go @@ -10,10 +10,10 @@ const ( SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, \ SYS_OPEN = 5 // { int sys_open(const char *path, \ SYS_CLOSE = 6 // { int sys_close(int fd); } - SYS_WAIT4 = 7 // { pid_t sys_wait4(pid_t pid, int *status, int options, \ SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, \ SYS_LINK = 9 // { int sys_link(const char *path, const char *link); } SYS_UNLINK = 10 // { int sys_unlink(const char *path); } + SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, \ SYS_CHDIR = 12 // { int sys_chdir(const char *path); } SYS_FCHDIR = 13 // { int sys_fchdir(int fd); } SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, \ @@ -21,6 +21,7 @@ const ( SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, \ SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); } + SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, \ SYS_GETPID = 20 // { pid_t sys_getpid(void); } SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, \ SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); } @@ -39,8 +40,11 @@ const ( SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); } SYS_SYNC = 36 // { void sys_sync(void); } SYS_KILL = 37 // { int sys_kill(int pid, int signum); } + SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); } SYS_GETPPID = 39 // { pid_t sys_getppid(void); } + SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); } SYS_DUP = 41 // { int sys_dup(int fd); } + SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, \ SYS_GETEGID = 43 // { gid_t sys_getegid(void); } SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, \ SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, \ @@ -51,6 +55,7 @@ const ( SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); } SYS_ACCT = 51 // { int sys_acct(const char *path); } SYS_SIGPENDING = 52 // { int sys_sigpending(void); } + SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); } SYS_IOCTL = 54 // { int sys_ioctl(int fd, \ SYS_REBOOT = 55 // { int sys_reboot(int opt); } SYS_REVOKE = 56 // { int sys_revoke(const char *path); } @@ -59,36 +64,52 @@ const ( SYS_EXECVE = 59 // { int sys_execve(const char *path, \ SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); } SYS_CHROOT = 61 // { int sys_chroot(const char *path); } + SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \ + SYS_STATFS = 63 // { int sys_statfs(const char *path, \ + SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); } + SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, \ SYS_VFORK = 66 // { int sys_vfork(void); } + SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, \ + SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, \ + SYS_SETITIMER = 69 // { int sys_setitimer(int which, \ + SYS_GETITIMER = 70 // { int sys_getitimer(int which, \ + SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, \ + SYS_KEVENT = 72 // { int sys_kevent(int fd, \ SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); } SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, \ SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, \ + SYS_UTIMES = 76 // { int sys_utimes(const char *path, \ + SYS_FUTIMES = 77 // { int sys_futimes(int fd, \ SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, \ SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, \ SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, \ SYS_GETPGRP = 81 // { int sys_getpgrp(void); } SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, int pgid); } - SYS_SETITIMER = 83 // { int sys_setitimer(int which, \ - SYS_GETITIMER = 86 // { int sys_getitimer(int which, \ + SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, \ + SYS_FUTIMENS = 85 // { int sys_futimens(int fd, \ + SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, \ + SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, \ + SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, \ SYS_DUP2 = 90 // { int sys_dup2(int from, int to); } + SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, \ SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); } - SYS_SELECT = 93 // { int sys_select(int nd, fd_set *in, fd_set *ou, \ + SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, \ SYS_FSYNC = 95 // { int sys_fsync(int fd); } SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); } SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); } SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, \ + SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); } SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); } SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); } SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, \ SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, \ SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); } + SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, \ + SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \ SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); } - SYS_GETTIMEOFDAY = 116 // { int sys_gettimeofday(struct timeval *tp, \ - SYS_GETRUSAGE = 117 // { int sys_getrusage(int who, struct rusage *rusage); } SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \ SYS_READV = 120 // { ssize_t sys_readv(int fd, \ SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \ - SYS_SETTIMEOFDAY = 122 // { int sys_settimeofday(const struct timeval *tv, \ SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); } SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); } SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); } @@ -101,7 +122,6 @@ const ( SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, \ SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); } SYS_RMDIR = 137 // { int sys_rmdir(const char *path); } - SYS_UTIMES = 138 // { int sys_utimes(const char *path, \ SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, \ SYS_SETSID = 147 // { int sys_setsid(void); } SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, \ @@ -122,21 +142,17 @@ const ( SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, \ SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, \ SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); } - SYS___SYSCTL = 202 // { int sys___sysctl(int *name, u_int namelen, \ + SYS___SYSCTL = 202 // { int sys___sysctl(const int *name, u_int namelen, \ SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); } SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); } - SYS_FUTIMES = 206 // { int sys_futimes(int fd, \ SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); } + SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, \ SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); } SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); } SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \ SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \ SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \ SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); } - SYS_CLOCK_GETTIME = 232 // { int sys_clock_gettime(clockid_t clock_id, \ - SYS_CLOCK_SETTIME = 233 // { int sys_clock_settime(clockid_t clock_id, \ - SYS_CLOCK_GETRES = 234 // { int sys_clock_getres(clockid_t clock_id, \ - SYS_NANOSLEEP = 240 // { int sys_nanosleep(const struct timespec *rqtp, \ SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, \ SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, \ SYS_ISSETUGID = 253 // { int sys_issetugid(void); } @@ -148,7 +164,6 @@ const ( SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, \ SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, \ SYS_KQUEUE = 269 // { int sys_kqueue(void); } - SYS_KEVENT = 270 // { int sys_kevent(int fd, \ SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); } SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); } SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \ @@ -160,32 +175,22 @@ const ( SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \ SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); } SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, \ - SYS_STAT = 291 // { int sys_stat(const char *path, struct stat *ub); } - SYS_FSTAT = 292 // { int sys_fstat(int fd, struct stat *sb); } - SYS_LSTAT = 293 // { int sys_lstat(const char *path, struct stat *ub); } SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, \ SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, \ SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, \ SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, \ SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); } SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); } - SYS___THRSLEEP = 300 // { int sys___thrsleep(const volatile void *ident, \ SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, \ SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); } SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \ SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); } SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, \ - SYS_GETFSSTAT = 306 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \ - SYS_STATFS = 307 // { int sys_statfs(const char *path, \ - SYS_FSTATFS = 308 // { int sys_fstatfs(int fd, struct statfs *buf); } - SYS_FHSTATFS = 309 // { int sys_fhstatfs(const fhandle_t *fhp, \ SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); } SYS_GETRTABLE = 311 // { int sys_getrtable(void); } - SYS_GETDIRENTRIES = 312 // { int sys_getdirentries(int fd, char *buf, \ SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, \ SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, \ SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, \ - SYS_FSTATAT = 316 // { int sys_fstatat(int fd, const char *path, \ SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \ SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, \ SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, \ @@ -195,8 +200,6 @@ const ( SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, \ SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, \ SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, \ - SYS_UTIMENSAT = 326 // { int sys_utimensat(int fd, const char *path, \ - SYS_FUTIMENS = 327 // { int sys_futimens(int fd, \ SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); } SYS___GET_TCB = 330 // { void *sys___get_tcb(void); } ) diff --git a/src/pkg/syscall/zsysnum_openbsd_amd64.go b/src/pkg/syscall/zsysnum_openbsd_amd64.go index 82c98b90e6..3b9ac4c941 100644 --- a/src/pkg/syscall/zsysnum_openbsd_amd64.go +++ b/src/pkg/syscall/zsysnum_openbsd_amd64.go @@ -10,10 +10,10 @@ const ( SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, \ SYS_OPEN = 5 // { int sys_open(const char *path, \ SYS_CLOSE = 6 // { int sys_close(int fd); } - SYS_WAIT4 = 7 // { pid_t sys_wait4(pid_t pid, int *status, int options, \ SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, \ SYS_LINK = 9 // { int sys_link(const char *path, const char *link); } SYS_UNLINK = 10 // { int sys_unlink(const char *path); } + SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, \ SYS_CHDIR = 12 // { int sys_chdir(const char *path); } SYS_FCHDIR = 13 // { int sys_fchdir(int fd); } SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, \ @@ -21,6 +21,7 @@ const ( SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, \ SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); } + SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, \ SYS_GETPID = 20 // { pid_t sys_getpid(void); } SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, \ SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); } @@ -39,8 +40,11 @@ const ( SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); } SYS_SYNC = 36 // { void sys_sync(void); } SYS_KILL = 37 // { int sys_kill(int pid, int signum); } + SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); } SYS_GETPPID = 39 // { pid_t sys_getppid(void); } + SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); } SYS_DUP = 41 // { int sys_dup(int fd); } + SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, \ SYS_GETEGID = 43 // { gid_t sys_getegid(void); } SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, \ SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, \ @@ -51,6 +55,7 @@ const ( SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); } SYS_ACCT = 51 // { int sys_acct(const char *path); } SYS_SIGPENDING = 52 // { int sys_sigpending(void); } + SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); } SYS_IOCTL = 54 // { int sys_ioctl(int fd, \ SYS_REBOOT = 55 // { int sys_reboot(int opt); } SYS_REVOKE = 56 // { int sys_revoke(const char *path); } @@ -59,36 +64,52 @@ const ( SYS_EXECVE = 59 // { int sys_execve(const char *path, \ SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); } SYS_CHROOT = 61 // { int sys_chroot(const char *path); } + SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \ + SYS_STATFS = 63 // { int sys_statfs(const char *path, \ + SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); } + SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, \ SYS_VFORK = 66 // { int sys_vfork(void); } + SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, \ + SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, \ + SYS_SETITIMER = 69 // { int sys_setitimer(int which, \ + SYS_GETITIMER = 70 // { int sys_getitimer(int which, \ + SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, \ + SYS_KEVENT = 72 // { int sys_kevent(int fd, \ SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); } SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, \ SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, \ + SYS_UTIMES = 76 // { int sys_utimes(const char *path, \ + SYS_FUTIMES = 77 // { int sys_futimes(int fd, \ SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, \ SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, \ SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, \ SYS_GETPGRP = 81 // { int sys_getpgrp(void); } SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, int pgid); } - SYS_SETITIMER = 83 // { int sys_setitimer(int which, \ - SYS_GETITIMER = 86 // { int sys_getitimer(int which, \ + SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, \ + SYS_FUTIMENS = 85 // { int sys_futimens(int fd, \ + SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, \ + SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, \ + SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, \ SYS_DUP2 = 90 // { int sys_dup2(int from, int to); } + SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, \ SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); } - SYS_SELECT = 93 // { int sys_select(int nd, fd_set *in, fd_set *ou, \ + SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, \ SYS_FSYNC = 95 // { int sys_fsync(int fd); } SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); } SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); } SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, \ + SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); } SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); } SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); } SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, \ SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, \ SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); } + SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, \ + SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \ SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); } - SYS_GETTIMEOFDAY = 116 // { int sys_gettimeofday(struct timeval *tp, \ - SYS_GETRUSAGE = 117 // { int sys_getrusage(int who, struct rusage *rusage); } SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \ SYS_READV = 120 // { ssize_t sys_readv(int fd, \ SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \ - SYS_SETTIMEOFDAY = 122 // { int sys_settimeofday(const struct timeval *tv, \ SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); } SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); } SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); } @@ -101,7 +122,6 @@ const ( SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, \ SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); } SYS_RMDIR = 137 // { int sys_rmdir(const char *path); } - SYS_UTIMES = 138 // { int sys_utimes(const char *path, \ SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, \ SYS_SETSID = 147 // { int sys_setsid(void); } SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, \ @@ -122,21 +142,17 @@ const ( SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, \ SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, \ SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); } - SYS___SYSCTL = 202 // { int sys___sysctl(int *name, u_int namelen, \ + SYS___SYSCTL = 202 // { int sys___sysctl(const int *name, u_int namelen, \ SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); } SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); } - SYS_FUTIMES = 206 // { int sys_futimes(int fd, \ SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); } + SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, \ SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); } SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); } SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \ SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \ SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \ SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); } - SYS_CLOCK_GETTIME = 232 // { int sys_clock_gettime(clockid_t clock_id, \ - SYS_CLOCK_SETTIME = 233 // { int sys_clock_settime(clockid_t clock_id, \ - SYS_CLOCK_GETRES = 234 // { int sys_clock_getres(clockid_t clock_id, \ - SYS_NANOSLEEP = 240 // { int sys_nanosleep(const struct timespec *rqtp, \ SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, \ SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, \ SYS_ISSETUGID = 253 // { int sys_issetugid(void); } @@ -148,7 +164,6 @@ const ( SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, \ SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, \ SYS_KQUEUE = 269 // { int sys_kqueue(void); } - SYS_KEVENT = 270 // { int sys_kevent(int fd, \ SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); } SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); } SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \ @@ -160,32 +175,22 @@ const ( SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \ SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); } SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, \ - SYS_STAT = 291 // { int sys_stat(const char *path, struct stat *ub); } - SYS_FSTAT = 292 // { int sys_fstat(int fd, struct stat *sb); } - SYS_LSTAT = 293 // { int sys_lstat(const char *path, struct stat *ub); } SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, \ SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, \ SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, \ SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, \ SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); } SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); } - SYS___THRSLEEP = 300 // { int sys___thrsleep(const volatile void *ident, \ SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, \ SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); } SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \ SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); } SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, \ - SYS_GETFSSTAT = 306 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \ - SYS_STATFS = 307 // { int sys_statfs(const char *path, \ - SYS_FSTATFS = 308 // { int sys_fstatfs(int fd, struct statfs *buf); } - SYS_FHSTATFS = 309 // { int sys_fhstatfs(const fhandle_t *fhp, \ SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); } SYS_GETRTABLE = 311 // { int sys_getrtable(void); } - SYS_GETDIRENTRIES = 312 // { int sys_getdirentries(int fd, char *buf, \ SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, \ SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, \ SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, \ - SYS_FSTATAT = 316 // { int sys_fstatat(int fd, const char *path, \ SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \ SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, \ SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, \ @@ -195,8 +200,6 @@ const ( SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, \ SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, \ SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, \ - SYS_UTIMENSAT = 326 // { int sys_utimensat(int fd, const char *path, \ - SYS_FUTIMENS = 327 // { int sys_futimens(int fd, \ SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); } SYS___GET_TCB = 330 // { void *sys___get_tcb(void); } ) diff --git a/src/pkg/syscall/ztypes_openbsd_386.go b/src/pkg/syscall/ztypes_openbsd_386.go index 3c9cdf28bf..5812391a60 100644 --- a/src/pkg/syscall/ztypes_openbsd_386.go +++ b/src/pkg/syscall/ztypes_openbsd_386.go @@ -19,12 +19,12 @@ type ( ) type Timespec struct { - Sec int32 + Sec int64 Nsec int32 } type Timeval struct { - Sec int32 + Sec int64 Usec int32 } @@ -72,14 +72,13 @@ const ( ) type Stat_t struct { - Dev int32 - Ino uint32 Mode uint32 + Dev int32 + Ino uint64 Nlink uint32 Uid uint32 Gid uint32 Rdev int32 - Lspare0 int32 Atim Timespec Mtim Timespec Ctim Timespec @@ -88,9 +87,7 @@ type Stat_t struct { Blksize uint32 Flags uint32 Gen uint32 - Lspare1 int32 X__st_birthtim Timespec - Qspare [2]int64 } type Statfs_t struct { @@ -110,11 +107,12 @@ type Statfs_t struct { F_fsid Fsid F_namemax uint32 F_owner uint32 - F_ctime uint32 - F_spare [3]uint32 + F_ctime uint64 F_fstypename [16]int8 F_mntonname [90]int8 F_mntfromname [90]int8 + F_mntfromspec [90]int8 + Pad_cgo_0 [2]byte Mount_info [160]byte } @@ -127,11 +125,13 @@ type Flock_t struct { } type Dirent struct { - Fileno uint32 - Reclen uint16 - Type uint8 - Namlen uint8 - Name [256]int8 + Fileno uint64 + Off int64 + Reclen uint16 + Type uint8 + Namlen uint8 + X__d_padding [4]uint8 + Name [256]int8 } type Fsid struct { @@ -262,21 +262,21 @@ type Kevent_t struct { Filter int16 Flags uint16 Fflags uint32 - Data int32 + Data int64 Udata *byte } type FdSet struct { - Bits [32]int32 + Bits [32]uint32 } const ( - SizeofIfMsghdr = 0xe8 - SizeofIfData = 0xd0 + SizeofIfMsghdr = 0xec + SizeofIfData = 0xd4 SizeofIfaMsghdr = 0x18 SizeofIfAnnounceMsghdr = 0x1a - SizeofRtMsghdr = 0x58 - SizeofRtMetrics = 0x30 + SizeofRtMsghdr = 0x60 + SizeofRtMetrics = 0x38 ) type IfMsghdr struct { @@ -364,9 +364,9 @@ type RtMsghdr struct { type RtMetrics struct { Pksent uint64 + Expire int64 Locks uint32 Mtu uint32 - Expire uint32 Refcnt uint32 Hopcount uint32 Recvpipe uint32 @@ -374,10 +374,11 @@ type RtMetrics struct { Ssthresh uint32 Rtt uint32 Rttvar uint32 + Pad uint32 } type Mclpool struct { - Grown uint32 + Grown int32 Alive uint16 Hwm uint16 Cwm uint16 diff --git a/src/pkg/syscall/ztypes_openbsd_amd64.go b/src/pkg/syscall/ztypes_openbsd_amd64.go index 3a0ac96fab..611b8ff3cd 100644 --- a/src/pkg/syscall/ztypes_openbsd_amd64.go +++ b/src/pkg/syscall/ztypes_openbsd_amd64.go @@ -19,9 +19,8 @@ type ( ) type Timespec struct { - Sec int32 - Pad_cgo_0 [4]byte - Nsec int64 + Sec int64 + Nsec int64 } type Timeval struct { @@ -73,14 +72,13 @@ const ( ) type Stat_t struct { - Dev int32 - Ino uint32 Mode uint32 + Dev int32 + Ino uint64 Nlink uint32 Uid uint32 Gid uint32 Rdev int32 - Lspare0 int32 Atim Timespec Mtim Timespec Ctim Timespec @@ -89,9 +87,8 @@ type Stat_t struct { Blksize uint32 Flags uint32 Gen uint32 - Lspare1 int32 + Pad_cgo_0 [4]byte X__st_birthtim Timespec - Qspare [2]int64 } type Statfs_t struct { @@ -112,12 +109,12 @@ type Statfs_t struct { F_fsid Fsid F_namemax uint32 F_owner uint32 - F_ctime uint32 - F_spare [3]uint32 + F_ctime uint64 F_fstypename [16]int8 F_mntonname [90]int8 F_mntfromname [90]int8 - Pad_cgo_1 [4]byte + F_mntfromspec [90]int8 + Pad_cgo_1 [2]byte Mount_info [160]byte } @@ -130,11 +127,13 @@ type Flock_t struct { } type Dirent struct { - Fileno uint32 - Reclen uint16 - Type uint8 - Namlen uint8 - Name [256]int8 + Fileno uint64 + Off int64 + Reclen uint16 + Type uint8 + Namlen uint8 + X__d_padding [4]uint8 + Name [256]int8 } type Fsid struct { @@ -263,16 +262,16 @@ const ( ) type Kevent_t struct { - Ident uint32 + Ident uint64 Filter int16 Flags uint16 Fflags uint32 - Data int32 + Data int64 Udata *byte } type FdSet struct { - Bits [32]int32 + Bits [32]uint32 } const ( @@ -280,8 +279,8 @@ const ( SizeofIfData = 0xe0 SizeofIfaMsghdr = 0x18 SizeofIfAnnounceMsghdr = 0x1a - SizeofRtMsghdr = 0x58 - SizeofRtMetrics = 0x30 + SizeofRtMsghdr = 0x60 + SizeofRtMetrics = 0x38 ) type IfMsghdr struct { @@ -371,9 +370,9 @@ type RtMsghdr struct { type RtMetrics struct { Pksent uint64 + Expire int64 Locks uint32 Mtu uint32 - Expire uint32 Refcnt uint32 Hopcount uint32 Recvpipe uint32 @@ -381,10 +380,11 @@ type RtMetrics struct { Ssthresh uint32 Rtt uint32 Rttvar uint32 + Pad uint32 } type Mclpool struct { - Grown uint32 + Grown int32 Alive uint16 Hwm uint16 Cwm uint16