mirror of
https://github.com/containers/podman.git
synced 2025-08-14 02:41:34 +08:00
Update containers/storage to pick up overlay driver fix
New pinned commit is ff8a6d2bf496daf46ab1a153f783a0f6b8762a54 This includes a fix to error reporting with overlayfs, and will produce more verbose errors when initializing overlayfs fails. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #546 Approved by: baude
This commit is contained in:
23
vendor/github.com/containers/storage/containers.go
generated
vendored
23
vendor/github.com/containers/storage/containers.go
generated
vendored
@ -106,10 +106,25 @@ type containerStore struct {
|
||||
byname map[string]*Container
|
||||
}
|
||||
|
||||
func copyContainer(c *Container) *Container {
|
||||
return &Container{
|
||||
ID: c.ID,
|
||||
Names: copyStringSlice(c.Names),
|
||||
ImageID: c.ImageID,
|
||||
LayerID: c.LayerID,
|
||||
Metadata: c.Metadata,
|
||||
BigDataNames: copyStringSlice(c.BigDataNames),
|
||||
BigDataSizes: copyStringInt64Map(c.BigDataSizes),
|
||||
BigDataDigests: copyStringDigestMap(c.BigDataDigests),
|
||||
Created: c.Created,
|
||||
Flags: copyStringInterfaceMap(c.Flags),
|
||||
}
|
||||
}
|
||||
|
||||
func (r *containerStore) Containers() ([]Container, error) {
|
||||
containers := make([]Container, len(r.containers))
|
||||
for i := range r.containers {
|
||||
containers[i] = *(r.containers[i])
|
||||
containers[i] = *copyContainer(r.containers[i])
|
||||
}
|
||||
return containers, nil
|
||||
}
|
||||
@ -277,7 +292,7 @@ func (r *containerStore) Create(id string, names []string, image, layer, metadat
|
||||
}
|
||||
err = r.Save()
|
||||
}
|
||||
return container, err
|
||||
return copyContainer(container), err
|
||||
}
|
||||
|
||||
func (r *containerStore) Metadata(id string) (string, error) {
|
||||
@ -355,7 +370,7 @@ func (r *containerStore) Delete(id string) error {
|
||||
|
||||
func (r *containerStore) Get(id string) (*Container, error) {
|
||||
if container, ok := r.lookup(id); ok {
|
||||
return container, nil
|
||||
return copyContainer(container), nil
|
||||
}
|
||||
return nil, ErrContainerUnknown
|
||||
}
|
||||
@ -444,7 +459,7 @@ func (r *containerStore) BigDataNames(id string) ([]string, error) {
|
||||
if !ok {
|
||||
return nil, ErrContainerUnknown
|
||||
}
|
||||
return c.BigDataNames, nil
|
||||
return copyStringSlice(c.BigDataNames), nil
|
||||
}
|
||||
|
||||
func (r *containerStore) SetBigData(id, key string, data []byte) error {
|
||||
|
Reference in New Issue
Block a user