mirror of
https://github.com/rclone/rclone.git
synced 2025-12-18 01:03:14 +00:00
vendor: update all dependencies
* Update all dependencies * Remove all `[[constraint]]` from Gopkg.toml * Add in the minimum number of `[[override]]` to build * Remove go get of github.com/inconshreveable/mousetrap as it is vendored * Update docs with new policy on constraints
This commit is contained in:
19
vendor/github.com/sevlyar/go-daemon/lock_file_unix.go
generated
vendored
19
vendor/github.com/sevlyar/go-daemon/lock_file_unix.go
generated
vendored
@@ -1,9 +1,8 @@
|
||||
// +build dragonfly freebsd linux netbsd openbsd plan9 solaris
|
||||
// +build darwin dragonfly freebsd linux netbsd openbsd plan9 solaris
|
||||
|
||||
package daemon
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
@@ -22,19 +21,3 @@ func unlockFile(fd uintptr) error {
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
const pathMax = 0x1000
|
||||
|
||||
func getFdName(fd uintptr) (name string, err error) {
|
||||
path := fmt.Sprintf("/proc/self/fd/%d", int(fd))
|
||||
// We use predefined pathMax const because /proc directory contains special files
|
||||
// so that unable to get correct size of pseudo-symlink through lstat.
|
||||
// please see notes and example for readlink syscall:
|
||||
// http://man7.org/linux/man-pages/man2/readlink.2.html#NOTES
|
||||
buf := make([]byte, pathMax)
|
||||
var n int
|
||||
if n, err = syscall.Readlink(path, buf); err == nil {
|
||||
name = string(buf[:n])
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user