mirror of
https://github.com/containers/podman
synced 2024-10-18 08:13:32 +00:00
libpod: fix HostConfig.Devices output from 'podman inspect' on FreeBSD
This changes the value emitted for HostConfig.Devices from 'null' to '[]'. The 'null' value was preventing ansible's podman module from working correctly on FreeBSD. Signed-off-by: Doug Rabson <dfr@rabson.org>
This commit is contained in:
parent
b98612227c
commit
60af13ca0f
|
@ -15,5 +15,14 @@ func (c *Container) platformInspectContainerHostConfig(ctrSpec *spec.Spec, hostC
|
||||||
// UTS namespace mode
|
// UTS namespace mode
|
||||||
hostConfig.UTSMode = c.NamespaceMode(spec.UTSNamespace, ctrSpec)
|
hostConfig.UTSMode = c.NamespaceMode(spec.UTSNamespace, ctrSpec)
|
||||||
|
|
||||||
|
// Devices
|
||||||
|
// Do not include if privileged - assumed that all devices will be
|
||||||
|
// included.
|
||||||
|
var err error
|
||||||
|
hostConfig.Devices, err = c.GetDevices(hostConfig.Privileged, *ctrSpec, map[string]string{})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue