Skip to content

Commit

Permalink
unix: add unexported name_to_handle_at and open_by_handle_at types & …
Browse files Browse the repository at this point in the history
…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 <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Tobias Klauser <[email protected]>
  • Loading branch information
bradfitz committed Apr 22, 2019
1 parent e8e3143 commit 953cdad
Show file tree
Hide file tree
Showing 14 changed files with 351 additions and 0 deletions.
13 changes: 13 additions & 0 deletions unix/syscall_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
26 changes: 26 additions & 0 deletions unix/zsyscall_linux_386.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions unix/zsyscall_linux_amd64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions unix/zsyscall_linux_arm.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions unix/zsyscall_linux_arm64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions unix/zsyscall_linux_mips.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions unix/zsyscall_linux_mips64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions unix/zsyscall_linux_mips64le.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions unix/zsyscall_linux_mipsle.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions unix/zsyscall_linux_ppc64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions unix/zsyscall_linux_ppc64le.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions unix/zsyscall_linux_riscv64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 953cdad

Please sign in to comment.