Fix codespell warnings

./features.go:30: tru ==> through, true
...
./utils_linux.go:147: infront ==> in front

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2024-05-23 22:00:06 -07:00
parent 68564eecde
commit 177c7d4f59
2 changed files with 13 additions and 14 deletions

View File

@@ -27,7 +27,7 @@ var featuresCommand = cli.Command{
return err return err
} }
tru := true t := true
feat := features.Features{ feat := features.Features{
OCIVersionMin: "1.0.0", OCIVersionMin: "1.0.0",
@@ -43,24 +43,24 @@ var featuresCommand = cli.Command{
Namespaces: specconv.KnownNamespaces(), Namespaces: specconv.KnownNamespaces(),
Capabilities: capabilities.KnownCapabilities(), Capabilities: capabilities.KnownCapabilities(),
Cgroup: &features.Cgroup{ Cgroup: &features.Cgroup{
V1: &tru, V1: &t,
V2: &tru, V2: &t,
Systemd: &tru, Systemd: &t,
SystemdUser: &tru, SystemdUser: &t,
Rdma: &tru, Rdma: &t,
}, },
Apparmor: &features.Apparmor{ Apparmor: &features.Apparmor{
Enabled: &tru, Enabled: &t,
}, },
Selinux: &features.Selinux{ Selinux: &features.Selinux{
Enabled: &tru, Enabled: &t,
}, },
IntelRdt: &features.IntelRdt{ IntelRdt: &features.IntelRdt{
Enabled: &tru, Enabled: &t,
}, },
MountExtensions: &features.MountExtensions{ MountExtensions: &features.MountExtensions{
IDMap: &features.IDMap{ IDMap: &features.IDMap{
Enabled: &tru, Enabled: &t,
}, },
}, },
}, },
@@ -74,7 +74,7 @@ var featuresCommand = cli.Command{
if seccomp.Enabled { if seccomp.Enabled {
feat.Linux.Seccomp = &features.Seccomp{ feat.Linux.Seccomp = &features.Seccomp{
Enabled: &tru, Enabled: &t,
Actions: seccomp.KnownActions(), Actions: seccomp.KnownActions(),
Operators: seccomp.KnownOperators(), Operators: seccomp.KnownOperators(),
Archs: seccomp.KnownArchs(), Archs: seccomp.KnownArchs(),

View File

@@ -143,9 +143,8 @@ func setupIO(process *libcontainer.Process, rootuid, rootgid int, createTTY, det
return setupProcessPipes(process, rootuid, rootgid) return setupProcessPipes(process, rootuid, rootgid)
} }
// createPidFile creates a file with the processes pid inside it atomically // createPidFile creates a file containing the PID,
// it creates a temp file with the paths filename + '.' infront of it // doing so atomically (via create and rename).
// then renames the file
func createPidFile(path string, process *libcontainer.Process) error { func createPidFile(path string, process *libcontainer.Process) error {
pid, err := process.Pid() pid, err := process.Pid()
if err != nil { if err != nil {