Run codespell on code

Also cleanup --rm=true to be just --rm

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2023-08-03 06:04:37 -04:00
parent 7a2c5422e8
commit 62a22c5d60
6 changed files with 7 additions and 7 deletions

View File

@ -64,7 +64,7 @@ func runFlags(cmd *cobra.Command) {
flags.SetNormalizeFunc(utils.AliasFlags) flags.SetNormalizeFunc(utils.AliasFlags)
flags.BoolVar(&runOpts.SigProxy, "sig-proxy", true, "Proxy received signals to the process") flags.BoolVar(&runOpts.SigProxy, "sig-proxy", true, "Proxy received signals to the process")
flags.BoolVar(&runRmi, "rmi", false, "Remove image unless used by other containers, implies --rm=true") flags.BoolVar(&runRmi, "rmi", false, "Remove image unless used by other containers, implies --rm")
preserveFdsFlagName := "preserve-fds" preserveFdsFlagName := "preserve-fds"
flags.UintVar(&runOpts.PreserveFDs, "preserve-fds", 0, "Pass a number of additional file descriptors into the container") flags.UintVar(&runOpts.PreserveFDs, "preserve-fds", 0, "Pass a number of additional file descriptors into the container")
@ -113,7 +113,7 @@ func run(cmd *cobra.Command, args []string) error {
if runRmi { if runRmi {
if cmd.Flags().Changed("rm") && !cliVals.Rm { if cmd.Flags().Changed("rm") && !cliVals.Rm {
return errors.New("the --rmi option does not work without --rm=true") return errors.New("the --rmi option does not work without --rm")
} }
cliVals.Rm = true cliVals.Rm = true
} }

View File

@ -347,7 +347,7 @@ the container when it exits. The default is **false**.
#### **--rmi** #### **--rmi**
After exit of the container, remove the image unless another After exit of the container, remove the image unless another
container is using it. Implies --rm=true on the new container. The default is *false*. container is using it. Implies --rm on the new container. The default is *false*.
@@option rootfs @@option rootfs

View File

@ -79,7 +79,7 @@ type MacMachine struct {
} }
// acquireVMImage determines if the image is already in a FCOS stream. If so, // acquireVMImage determines if the image is already in a FCOS stream. If so,
// retrives the image path of the uncompressed file. Otherwise, the user has // retrieves the image path of the uncompressed file. Otherwise, the user has
// provided an alternative image, so we set the image path and download the image. // provided an alternative image, so we set the image path and download the image.
func (m *MacMachine) acquireVMImage(opts machine.InitOptions, dataDir string) error { func (m *MacMachine) acquireVMImage(opts machine.InitOptions, dataDir string) error {
// Acquire the image // Acquire the image

View File

@ -196,7 +196,7 @@ func migrateVM(configPath string, config []byte, vm *MachineVM) error {
} }
// acquireVMImage determines if the image is already in a FCOS stream. If so, // acquireVMImage determines if the image is already in a FCOS stream. If so,
// retrives the image path of the uncompressed file. Otherwise, the user has // retrieves the image path of the uncompressed file. Otherwise, the user has
// provided an alternative image, so we set the image path and download the image. // provided an alternative image, so we set the image path and download the image.
func (v *MachineVM) acquireVMImage(opts machine.InitOptions) error { func (v *MachineVM) acquireVMImage(opts machine.InitOptions) error {
switch opts.ImagePath { switch opts.ImagePath {

View File

@ -191,7 +191,7 @@ echo $rand | 0 | $rand
run_podman 1 image exists $NONLOCAL_IMAGE run_podman 1 image exists $NONLOCAL_IMAGE
run_podman 125 run --rmi --rm=false $NONLOCAL_IMAGE /bin/true run_podman 125 run --rmi --rm=false $NONLOCAL_IMAGE /bin/true
is "$output" "Error: the --rmi option does not work without --rm=true" "--rmi should refuse to remove images when --rm=false set by user" is "$output" "Error: the --rmi option does not work without --rm" "--rmi should refuse to remove images when --rm=false set by user"
} }
# 'run --conmon-pidfile --cid-file' makes sure we don't regress on these flags. # 'run --conmon-pidfile --cid-file' makes sure we don't regress on these flags.

View File

@ -348,7 +348,7 @@ EOF
stat -c "%u:%g:%s" /vol/myfile stat -c "%u:%g:%s" /vol/myfile
is "$output" "$(id -u):$(id -g):0" "with keep-id from containers.conf: stat(file in container) == my uid" is "$output" "$(id -u):$(id -g):0" "with keep-id from containers.conf: stat(file in container) == my uid"
# With keep-id from containers.conf overriden with --userns=nomap # With keep-id from containers.conf overridden with --userns=nomap
CONTAINERS_CONF_OVERRIDE="$containersconf" run_podman run --rm -v $myvoldir:/vol:z --userns=nomap $IMAGE \ CONTAINERS_CONF_OVERRIDE="$containersconf" run_podman run --rm -v $myvoldir:/vol:z --userns=nomap $IMAGE \
stat -c "%u:%g:%s" /vol/myfile stat -c "%u:%g:%s" /vol/myfile
is "$output" "65534:65534:0" "w/o overridden containers.conf keep-id->nomap: stat(file in container) == root" is "$output" "65534:65534:0" "w/o overridden containers.conf keep-id->nomap: stat(file in container) == root"