mirror of
https://github.com/containers/podman.git
synced 2025-12-05 04:40:47 +08:00
vendor buildah, image, storage, cni
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
19
vendor/github.com/containers/storage/lockfile_otherunix.go
generated
vendored
Normal file
19
vendor/github.com/containers/storage/lockfile_otherunix.go
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// +build darwin freebsd
|
||||
|
||||
package storage
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func (l *lockfile) TouchedSince(when time.Time) bool {
|
||||
st := unix.Stat_t{}
|
||||
err := unix.Fstat(int(l.fd), &st)
|
||||
if err != nil {
|
||||
return true
|
||||
}
|
||||
touched := time.Unix(st.Mtimespec.Unix())
|
||||
return when.Before(touched)
|
||||
}
|
||||
Reference in New Issue
Block a user