• Yuval Pavel Zholkover's avatar
    syscall: FreeBSD 12 ino64 support · dc6eb200
    Yuval Pavel Zholkover authored
    This is similar to CL 136816 for x/sys/unix, changing the FreeBSD ABI to use 64-bit inodes in
    Stat_t, Statfs_t, and Dirent types.
    
    The changes are forward compatible, that is FreeBSD 10.x, 11.x continue to use their current sysnum numbers.
    The affected types are converted to the new layout (with some overhead).
    Thus the same statically linked binary should work using the native sysnums (without any conversion) on FreeBSD 12.
    
    Breaking API changes in package syscall are:
    Mknod takes a uint64 (C dev_t) instead of int.
    Stat_t: Dev, Ino, Nlink, Rdev, Gen became uint64.
      Atimespec, Mtimespec, Ctimespec, Birthtimespec renamed to Atim, Mtim, Ctim, Birthtim respectively.
    
    Statfs_t: Mntonname and Mntfromname changed from [88]int8 to [1024]int8 arrays.
    
    Dirent: Fileno became uint64, Namlen uint16 and an additional field Off int64 (currently unused) was added.
    
    The following commands were run to generate ztypes_* and zsyscall_* on FreeBSD-12.0-ALPHA6 systems (GOARCH=386 were run on the same amd64 host):
    GOOS=freebsd GOARCH=amd64 ./mksyscall.pl -tags freebsd,amd64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go |gofmt >zsyscall_freebsd_amd64.go
    GOOS=freebsd GOARCH=amd64 go tool cgo -godefs types_freebsd.go | GOOS=freebsd GOARCH=amd64 go run mkpost.go >ztypes_freebsd_amd64.go
    
    GOOS=freebsd GOARCH=386 ./mksyscall.pl -l32 -tags freebsd,386 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go |gofmt >zsyscall_freebsd_386.go
    GOOS=freebsd GOARCH=386 go tool cgo -godefs types_freebsd.go | GOOS=freebsd GOARCH=386 go run mkpost.go >ztypes_freebsd_386.go
    
    GOOS=freebsd GOARCH=arm ./mksyscall.pl -l32 -arm -tags freebsd,arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go |gofmt >zsyscall_freebsd_arm.go
    GOOS=freebsd GOARCH=arm go tool cgo -godefs -- -fsigned-char types_freebsd.go | GOOS=freebsd GOARCH=arm go run mkpost.go >ztypes_freebsd_arm.go
    
    The Kevent struct was changed to use the FREEBSD_COMPAT11 version always (requiring the COMPAT_FREEBSD11 kernel option FreeBSD-12, this is the default).
    
    The definitions of ifData were not updated, their functionality in has have been replaced by vendored golang.org/x/net/route.
    
    freebsdVersion initialization was dropped from init() in favor of a sync.Once based wrapper - supportsABI().
    
    Updates #22448.
    
    Change-Id: I359b756e2849c036d7ed7f75dbd6ec836e0b90b4
    Reviewed-on: https://go-review.googlesource.com/c/138595Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    dc6eb200
Name
Last commit
Last update
..
exec Loading commit data...
signal Loading commit data...
user Loading commit data...
dir.go Loading commit data...
dir_plan9.go Loading commit data...
dir_unix.go Loading commit data...
dir_windows.go Loading commit data...
env.go Loading commit data...
env_test.go Loading commit data...
env_unix_test.go Loading commit data...
error.go Loading commit data...
error_plan9.go Loading commit data...
error_posix.go Loading commit data...
error_test.go Loading commit data...
error_unix.go Loading commit data...
error_unix_test.go Loading commit data...
error_windows.go Loading commit data...
error_windows_test.go Loading commit data...
example_test.go Loading commit data...
exec.go Loading commit data...
exec_plan9.go Loading commit data...
exec_posix.go Loading commit data...
exec_unix.go Loading commit data...
exec_windows.go Loading commit data...
executable.go Loading commit data...
executable_darwin.go Loading commit data...
executable_freebsd.go Loading commit data...
executable_path.go Loading commit data...
executable_plan9.go Loading commit data...
executable_procfs.go Loading commit data...
executable_solaris.go Loading commit data...
executable_test.go Loading commit data...
executable_windows.go Loading commit data...
export_test.go Loading commit data...
export_windows_test.go Loading commit data...
fifo_test.go Loading commit data...
file.go Loading commit data...
file_plan9.go Loading commit data...
file_posix.go Loading commit data...
file_unix.go Loading commit data...
file_windows.go Loading commit data...
getwd.go Loading commit data...
getwd_darwin.go Loading commit data...
os_test.go Loading commit data...
os_unix_test.go Loading commit data...
os_windows_test.go Loading commit data...
path.go Loading commit data...
path_plan9.go Loading commit data...
path_test.go Loading commit data...
path_unix.go Loading commit data...
path_windows.go Loading commit data...
path_windows_test.go Loading commit data...
pipe2_bsd.go Loading commit data...
pipe_bsd.go Loading commit data...
pipe_linux.go Loading commit data...
pipe_test.go Loading commit data...
proc.go Loading commit data...
stat.go Loading commit data...
stat_darwin.go Loading commit data...
stat_dragonfly.go Loading commit data...
stat_freebsd.go Loading commit data...
stat_linux.go Loading commit data...
stat_nacljs.go Loading commit data...
stat_netbsd.go Loading commit data...
stat_openbsd.go Loading commit data...
stat_plan9.go Loading commit data...
stat_solaris.go Loading commit data...
stat_test.go Loading commit data...
stat_unix.go Loading commit data...
stat_windows.go Loading commit data...
sticky_bsd.go Loading commit data...
sticky_notbsd.go Loading commit data...
str.go Loading commit data...
sys.go Loading commit data...
sys_bsd.go Loading commit data...
sys_js.go Loading commit data...
sys_linux.go Loading commit data...
sys_nacl.go Loading commit data...
sys_plan9.go Loading commit data...
sys_solaris.go Loading commit data...
sys_unix.go Loading commit data...
sys_windows.go Loading commit data...
timeout_test.go Loading commit data...
types.go Loading commit data...
types_plan9.go Loading commit data...
types_unix.go Loading commit data...
types_windows.go Loading commit data...
wait_unimp.go Loading commit data...
wait_wait6.go Loading commit data...
wait_waitid.go Loading commit data...