mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-05 08:37:31 -04:00
unix: implement InotifyInit using InotifyInit1 on all linux platforms
Most newer architectures (e.g. arm64 or riscv64) don't provide the inotify_init syscall and some systems (e.g. Android) block it even if it were available. Internally, the inotify_init syscall is implemented exactly like inotify_init1 [1], so there is no point in having a separate wrapper on some platforms. [1] https://elixir.bootlin.com/linux/v5.14.1/source/fs/notify/inotify/inotify_user.c#L704 Change-Id: Iae69de8e6cad1c6207fc0f521e275d94cdad3ca5 Reviewed-on: https://go-review.googlesource.com/c/sys/+/347869 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
97244b9997
commit
6f6e22806c
@@ -211,10 +211,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||
rsa.Service_name_len = uint64(length)
|
||||
}
|
||||
|
||||
func InotifyInit() (fd int, err error) {
|
||||
return InotifyInit1(0)
|
||||
}
|
||||
|
||||
// dup2 exists because func Dup3 in syscall_linux.go references
|
||||
// it in an unreachable path. dup2 isn't available on arm64.
|
||||
func dup2(oldfd int, newfd int) error
|
||||
|
||||
Reference in New Issue
Block a user