@@ -11,7 +11,6 @@ import (
11
11
"github.com/containers/podman/v5/libpod/driver"
12
12
"github.com/containers/podman/v5/pkg/signal"
13
13
"github.com/containers/podman/v5/pkg/util"
14
- "github.com/containers/storage/types"
15
14
"github.com/docker/go-units"
16
15
spec "github.com/opencontainers/runtime-spec/specs-go"
17
16
"github.com/sirupsen/logrus"
@@ -491,17 +490,6 @@ func (c *Container) generateInspectContainerConfig(spec *spec.Spec) *define.Insp
491
490
return ctrConfig
492
491
}
493
492
494
- func generateIDMappings (idMappings types.IDMappingOptions ) * define.InspectIDMappings {
495
- var inspectMappings define.InspectIDMappings
496
- for _ , uid := range idMappings .UIDMap {
497
- inspectMappings .UIDMap = append (inspectMappings .UIDMap , fmt .Sprintf ("%d:%d:%d" , uid .ContainerID , uid .HostID , uid .Size ))
498
- }
499
- for _ , gid := range idMappings .GIDMap {
500
- inspectMappings .GIDMap = append (inspectMappings .GIDMap , fmt .Sprintf ("%d:%d:%d" , gid .ContainerID , gid .HostID , gid .Size ))
501
- }
502
- return & inspectMappings
503
- }
504
-
505
493
// Generate the InspectContainerHostConfig struct for the HostConfig field of
506
494
// Inspect.
507
495
func (c * Container ) generateInspectContainerHostConfig (ctrSpec * spec.Spec , namedVolumes []* ContainerNamedVolume , mounts []spec.Mount ) (* define.InspectContainerHostConfig , error ) {
@@ -659,29 +647,6 @@ func (c *Container) generateInspectContainerHostConfig(ctrSpec *spec.Spec, named
659
647
return hostConfig , nil
660
648
}
661
649
662
- // Return true if the container is running in the host's PID NS.
663
- func (c * Container ) inHostPidNS () (bool , error ) {
664
- if c .config .PIDNsCtr != "" {
665
- return false , nil
666
- }
667
- ctrSpec , err := c .specFromState ()
668
- if err != nil {
669
- return false , err
670
- }
671
- if ctrSpec .Linux != nil {
672
- // Locate the spec's PID namespace.
673
- // If there is none, it's pid=host.
674
- // If there is one and it has a path, it's "ns:".
675
- // If there is no path, it's default - the empty string.
676
- for _ , ns := range ctrSpec .Linux .Namespaces {
677
- if ns .Type == spec .PIDNamespace {
678
- return false , nil
679
- }
680
- }
681
- }
682
- return true , nil
683
- }
684
-
685
650
func (c * Container ) GetDevices (priv bool , ctrSpec spec.Spec , deviceNodes map [string ]string ) ([]define.InspectDevice , error ) {
686
651
devices := []define.InspectDevice {}
687
652
if ctrSpec .Linux != nil && ! priv {
0 commit comments