vendor: _actually_ update containers/storage?
I obviously bungled my attempt in #1391 so this is fixing that. Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
0b736bb43f
commit
4a65baf87b
7 changed files with 201 additions and 131 deletions
20
vendor/github.com/containers/storage/lockfile_linux.go
generated
vendored
Normal file
20
vendor/github.com/containers/storage/lockfile_linux.go
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
// +build linux solaris
|
||||
|
||||
package storage
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// TouchedSince indicates if the lock file has been touched since the specified time
|
||||
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.Mtim.Unix())
|
||||
return when.Before(touched)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue