From 5152be5013b20276d9cf0132ffd19da054b69ace Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 7 Feb 2023 14:00:54 +0100 Subject: [qemu] Fix error messages --- core/modules/qemu/data/opt/openslx/scripts/systemd-qemu_env | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'core/modules/qemu') diff --git a/core/modules/qemu/data/opt/openslx/scripts/systemd-qemu_env b/core/modules/qemu/data/opt/openslx/scripts/systemd-qemu_env index 6463ce9c..15e904b3 100755 --- a/core/modules/qemu/data/opt/openslx/scripts/systemd-qemu_env +++ b/core/modules/qemu/data/opt/openslx/scripts/systemd-qemu_env @@ -55,14 +55,14 @@ if passthrough_mdev_enabled; then # get Intel integrated GPU mediated device for passthrough pt_mdev_device="$(passthrough_mdev_device_get_intel_igd)" if [ -z "${pt_mdev_device}" ]; then - slxlog --echo "qemu" "Could find any Intel integrated GPU with mediated device (Intel GVT-g) support!" + slxlog --echo "qemu" "Could not find any Intel integrated GPU with mediated device (Intel GVT-g) support!" exit 5; fi # get Intel GVT-g mediated device instance type pt_mdev_device_type="$(passthrough_mdev_type_get "${pt_mdev_device}")" if [ -z "${pt_mdev_device_type}" ]; then - slxlog --echo "qemu" "Could obtain the mediated device instance type of the Intel integrated GPU (${pt_mdev_device})" + slxlog --echo "qemu" "Could not obtain the mediated device instance type of the Intel integrated GPU (${pt_mdev_device})" exit 6; fi @@ -70,10 +70,7 @@ if passthrough_mdev_enabled; then pt_mdev_uuid="$(uuidgen)" # create Intel GVT-g mediated device instance - passthrough_mdev_instance_create "${pt_mdev_device}" "${pt_mdev_device_type}" "${pt_mdev_uuid}" - if [ "${?}" -eq 0 ]; then - slxlog --echo "qemu" "Successfully created Intel GVT-g mediated device instance (${pt_mdev_uuid})" - else + if ! passthrough_mdev_instance_create "${pt_mdev_device}" "${pt_mdev_device_type}" "${pt_mdev_uuid}"; then slxlog --echo "qemu" "Failed to create Intel GVT-g mediated device instance!" fi fi -- cgit v1.2.3-55-g7522