mirror of
https://github.com/containers/podman.git
synced 2025-09-28 01:04:28 +08:00
Update c/storage to 9b10041d7b2ef767ce9c42b5862b6c51eeb82214
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
12
vendor/github.com/containers/storage/pkg/system/stat_unix.go
generated
vendored
12
vendor/github.com/containers/storage/pkg/system/stat_unix.go
generated
vendored
@ -58,3 +58,15 @@ func Stat(path string) (*StatT, error) {
|
||||
}
|
||||
return fromStatT(s)
|
||||
}
|
||||
|
||||
// Fstat takes an open file descriptor and returns
|
||||
// a system.StatT type pertaining to that file.
|
||||
//
|
||||
// Throws an error if the file descriptor is invalid
|
||||
func Fstat(fd int) (*StatT, error) {
|
||||
s := &syscall.Stat_t{}
|
||||
if err := syscall.Fstat(fd, s); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return fromStatT(s)
|
||||
}
|
||||
|
Reference in New Issue
Block a user