[PATCH] qemu: validate: Reword error message when CCW addresses are not supported for a machine

Peter Krempa posted 1 patch 5 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/07a1d96745ce6f948de2f3d14b12d2f780e43975.1700556799.git.pkrempa@redhat.com
src/qemu/qemu_validate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] qemu: validate: Reword error message when CCW addresses are not supported for a machine
Posted by Peter Krempa 5 months, 1 week ago
Reword the error message to clearly state that the machine type doesn't
support the address type. It doesn't matter which device it's for.

Additionally the alias may be still NULL at the point when the error is
being reported misleading users that they have something wrong with a
specific device.

Resolves:https://issues.redhat.com/browse/RHEL-16878
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_validate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index 93df9e4c8e..2afd7e128a 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -1512,8 +1512,8 @@ qemuValidateDomainDeviceDefAddress(const virDomainDeviceDef *dev,
     case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW:
         if (!qemuDomainIsS390CCW(def)) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("cannot use CCW address type for device '%1$s' using machine type '%2$s'"),
-                           NULLSTR(info->alias), def->os.machine);
+                           _("CCW addresses are not supported by machine type '%1$s'"),
+                           def->os.machine);
             return -1;
         }

-- 
2.41.0
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [PATCH] qemu: validate: Reword error message when CCW addresses are not supported for a machine
Posted by Ján Tomko 5 months, 1 week ago
On a Tuesday in 2023, Peter Krempa wrote:
>Reword the error message to clearly state that the machine type doesn't
>support the address type. It doesn't matter which device it's for.
>
>Additionally the alias may be still NULL at the point when the error is
>being reported misleading users that they have something wrong with a
>specific device.
>
>Resolves:https://issues.redhat.com/browse/RHEL-16878

Missing space after ':'

>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> src/qemu/qemu_validate.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [PATCH] qemu: validate: Reword error message when CCW addresses are not supported for a machine
Posted by Boris Fiuczynski 5 months, 1 week ago
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>

On 11/21/23 9:53 AM, Peter Krempa wrote:
> Reword the error message to clearly state that the machine type doesn't
> support the address type. It doesn't matter which device it's for.
> 
> Additionally the alias may be still NULL at the point when the error is
> being reported misleading users that they have something wrong with a
> specific device.
> 
> Resolves:https://issues.redhat.com/browse/RHEL-16878
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
>   src/qemu/qemu_validate.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
> index 93df9e4c8e..2afd7e128a 100644
> --- a/src/qemu/qemu_validate.c
> +++ b/src/qemu/qemu_validate.c
> @@ -1512,8 +1512,8 @@ qemuValidateDomainDeviceDefAddress(const virDomainDeviceDef *dev,
>       case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW:
>           if (!qemuDomainIsS390CCW(def)) {
>               virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
> -                           _("cannot use CCW address type for device '%1$s' using machine type '%2$s'"),
> -                           NULLSTR(info->alias), def->os.machine);
> +                           _("CCW addresses are not supported by machine type '%1$s'"),
> +                           def->os.machine);
>               return -1;
>           }
> 


-- 
Mit freundlichen Grüßen/Kind regards
    Boris Fiuczynski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Gregor Pillen
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org