mirror of
https://github.com/containers/skopeo.git
synced 2025-09-14 05:50:56 +00:00
Bump github.com/containers/storage from 1.16.5 to 1.16.6
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.16.5 to 1.16.6. - [Release notes](https://github.com/containers/storage/releases) - [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md) - [Commits](https://github.com/containers/storage/compare/v1.16.5...v1.16.6) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
committed by
Daniel J Walsh
parent
e31d5a0e8f
commit
336164246b
34
vendor/github.com/containers/storage/store.go
generated
vendored
34
vendor/github.com/containers/storage/store.go
generated
vendored
@@ -3417,12 +3417,44 @@ func ReloadConfigurationFile(configFile string, storeOptions *StoreOptions) {
|
||||
}
|
||||
}
|
||||
|
||||
var prevReloadConfig = struct {
|
||||
storeOptions *StoreOptions
|
||||
mod time.Time
|
||||
mutex sync.Mutex
|
||||
configFile string
|
||||
}{}
|
||||
|
||||
func reloadConfigurationFileIfNeeded(configFile string, storeOptions *StoreOptions) {
|
||||
prevReloadConfig.mutex.Lock()
|
||||
defer prevReloadConfig.mutex.Unlock()
|
||||
|
||||
fi, err := os.Stat(configFile)
|
||||
if err != nil {
|
||||
if !os.IsNotExist(err) {
|
||||
fmt.Printf("Failed to read %s %v\n", configFile, err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
mtime := fi.ModTime()
|
||||
if prevReloadConfig.storeOptions != nil && prevReloadConfig.mod == mtime && prevReloadConfig.configFile == configFile {
|
||||
*storeOptions = *prevReloadConfig.storeOptions
|
||||
return
|
||||
}
|
||||
|
||||
ReloadConfigurationFile(configFile, storeOptions)
|
||||
|
||||
prevReloadConfig.storeOptions = storeOptions
|
||||
prevReloadConfig.mod = mtime
|
||||
prevReloadConfig.configFile = configFile
|
||||
}
|
||||
|
||||
func init() {
|
||||
defaultStoreOptions.RunRoot = "/var/run/containers/storage"
|
||||
defaultStoreOptions.GraphRoot = "/var/lib/containers/storage"
|
||||
defaultStoreOptions.GraphDriverName = ""
|
||||
|
||||
ReloadConfigurationFile(defaultConfigFile, &defaultStoreOptions)
|
||||
reloadConfigurationFileIfNeeded(defaultConfigFile, &defaultStoreOptions)
|
||||
}
|
||||
|
||||
// GetDefaultMountOptions returns the default mountoptions defined in container/storage
|
||||
|
Reference in New Issue
Block a user