mirror of
https://github.com/containers/podman.git
synced 2025-06-23 10:38:20 +08:00
changes to allow for darwin compilation
Signed-off-by: baude <bbaude@redhat.com> Closes: #1015 Approved by: baude
This commit is contained in:
@ -10,9 +10,7 @@ import (
|
||||
"github.com/cri-o/ocicni/pkg/ocicni"
|
||||
"github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/go-connections/nat"
|
||||
"github.com/opencontainers/runc/libcontainer/devices"
|
||||
spec "github.com/opencontainers/runtime-spec/specs-go"
|
||||
"github.com/opencontainers/runtime-tools/generate"
|
||||
"github.com/opencontainers/selinux/go-selinux/label"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/projectatomic/libpod/libpod"
|
||||
@ -488,21 +486,6 @@ func (c *CreateConfig) CreatePortBindings() ([]ocicni.PortMapping, error) {
|
||||
return portBindings, nil
|
||||
}
|
||||
|
||||
// AddPrivilegedDevices iterates through host devices and adds all
|
||||
// host devices to the spec
|
||||
func (c *CreateConfig) AddPrivilegedDevices(g *generate.Generator) error {
|
||||
hostDevices, err := devices.HostDevices()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
g.ClearLinuxDevices()
|
||||
for _, d := range hostDevices {
|
||||
g.AddDevice(Device(d))
|
||||
}
|
||||
g.AddLinuxResourcesDevice(true, "", nil, nil, "rwm")
|
||||
return nil
|
||||
}
|
||||
|
||||
func getStatFromPath(path string) (unix.Stat_t, error) {
|
||||
s := unix.Stat_t{}
|
||||
err := unix.Stat(path, &s)
|
||||
|
Reference in New Issue
Block a user