mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-29 05:16:30 -04:00
unix: add unexported name_to_handle_at and open_by_handle_at types & wrappers
No usable change for users in this CL; just auto-generated syscall wrapper funcs & types. The next CL will have hand-written code adding the nice Go API around these unexported symbols. (as outlined in the comment at https://golang.org/issue/30537#issuecomment-470284573) Updates golang/go#30537 Change-Id: I5e34df517efcf509fff97f670425500cc6608d59 Reviewed-on: https://go-review.googlesource.com/c/sys/+/172584 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
@@ -1662,6 +1662,19 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return EACCES
|
||||
}
|
||||
|
||||
//sys nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) = SYS_NAME_TO_HANDLE_AT
|
||||
//sys openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) = SYS_OPEN_BY_HANDLE_AT
|
||||
|
||||
// fileHandle is the argument to nameToHandleAt and openByHandleAt. We
|
||||
// originally tried to generate it via unix/linux/types.go with "type
|
||||
// fileHandle C.struct_file_handle" but that generated empty structs
|
||||
// for mips64 and mips64le. Instead, hard code it for now (it's the
|
||||
// same everywhere else) until the mips64 generator issue is fixed.
|
||||
type fileHandle struct {
|
||||
Bytes uint32
|
||||
Type int32
|
||||
}
|
||||
|
||||
/*
|
||||
* Unimplemented
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user