Revert "fix and improve --extra_args"

This reverts commit ad837f4162.
This commit is contained in:
xxx 2023-03-01 16:20:11 +01:00
parent 04b4dfc055
commit e17a201d00
2 changed files with 6 additions and 7 deletions

View File

@ -774,7 +774,7 @@ You can also pass optional parameters
--keyboard_layout <layout> : Set keyboard layout.
--mouse <type> : Set mouse. @Options: 'tablet' (default), 'ps2', 'usb', 'virtio'
--usb-controller <type> : Set usb-controller. @Options: 'ehci' (default), 'xhci', 'none'
--extra_args|--xa <arguments> : Pass additional arguments to qemu. 1 per element eg --xa '-device' --xa 'tpm-tis,tpmdev=tpm0'
--extra_args <arguments> : Pass additional arguments to qemu
--version : Print version
```

View File

@ -1334,7 +1334,7 @@ function usage() {
echo " --keyboard_layout <layout> : Set keyboard layout."
echo " --mouse <type> : Set mouse. @Options: 'tablet' (default), 'ps2', 'usb', 'virtio'"
echo " --usb-controller <type> : Set usb-controller. @Options: 'ehci' (default), 'xhci', 'none'"
echo " --extra_args|--xa <arguments> : Pass additional arguments to qemu. 1 per element eg --xa '-device' --xa 'tpm-tis,tpmdev=tpm0'"
echo " --extra_args <arguments> : Pass additional arguments to qemu"
echo " --version : Print version"
exit 1
}
@ -1636,11 +1636,10 @@ else
USB_CONTROLLER="${2}"
shift;
shift;;
-extra_args|--extra_args|--xa)
shift
if [[ ! $EXTRA_ARGS ]]; then EXTRA_ARGS="$1"
else EXTRA_ARGS+=" $1" ; fi
shift ;;
-extra_args|--extra_args)
EXTRA_ARGS="${2}"
shift;
shift;;
-version|--version)
echo "${VERSION}"
exit;;