]> Cypherpunks repositories - gostls13.git/commit
syscall: update linux/loong64 kernel ABI, emulate fstatat with statx
authorWANG Xuerui <git@xen0n.name>
Sat, 21 May 2022 13:05:00 +0000 (21:05 +0800)
committerGopher Robot <gobot@golang.org>
Thu, 26 May 2022 20:15:45 +0000 (20:15 +0000)
commitf8c26a59a49e23074b20b91ed3c75958ddc81559
tree7528d54c04295886d37b5f9e5722432239b27430
parent78b8e4fbce8a49d7624362242e344968c4fa8382
syscall: update linux/loong64 kernel ABI, emulate fstatat with statx

The linux/loong64 kernel ABI has changed a little since the inception
of the Go port; most notably fstat and fstatat are being removed [1],
leaving only statx as the stat mechanism. Fortunately the structs are
easy enough to translate, and we now exclusively use statx across the
board on loong64 for best compatibility with past and future kernels
(due to the architecture's young age, statx is always available).

In wiring up the statx calls, it turned out the linux/loong64 syscall
definitions were out-of-date, so the generation script received some
tweaking as well.

[1]: https://lore.kernel.org/all/20220518092619.1269111-1-chenhuacai@loongson.cn/

Change-Id: Ifebb9ab9fef783683e453fa331d623575e824a48
Reviewed-on: https://go-review.googlesource.com/c/go/+/407694
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alex Rakoczy <alex@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
src/internal/syscall/unix/at.go
src/internal/syscall/unix/at_fstatat.go [new file with mode: 0644]
src/internal/syscall/unix/at_statx.go [new file with mode: 0644]
src/internal/syscall/unix/at_sysnum_fstatat_linux.go
src/syscall/mkerrors.sh
src/syscall/syscall_linux_loong64.go
src/syscall/types_linux.go
src/syscall/zerrors_linux_loong64.go
src/syscall/zsyscall_linux_loong64.go
src/syscall/zsysnum_linux_loong64.go
src/syscall/ztypes_linux_loong64.go