[libvirt] [PATCH] qemu: command: Use XML based disk bus convertor in error message

Peter Krempa posted 1 patch 4 years, 4 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/5ff6da09f8a2c1cd9c908128b1eff8826ab9cca7.1573487807.git.pkrempa@redhat.com
src/qemu/qemu_command.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] qemu: command: Use XML based disk bus convertor in error message
Posted by Peter Krempa 4 years, 4 months ago
The qemu driver has an internal implementation for converting disk bus
to string for use with qemu. This should not be used in error messages
though as we want to report the string based on the XML value.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_command.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index f37aecda37..3806cbbaf9 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1303,7 +1303,7 @@ qemuCheckDiskConfig(virDomainDiskDefPtr disk,
             disk->bus != VIR_DOMAIN_DISK_BUS_SCSI) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                            _("disk device='lun' is not supported for bus='%s'"),
-                           virDomainDiskQEMUBusTypeToString(disk->bus));
+                           virDomainDiskBusTypeToString(disk->bus));
             return -1;
         }

-- 
2.23.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] qemu: command: Use XML based disk bus convertor in error message
Posted by Eric Blake 4 years, 4 months ago
On 11/11/19 9:56 AM, Peter Krempa wrote:
> The qemu driver has an internal implementation for converting disk bus
> to string for use with qemu. This should not be used in error messages
> though as we want to report the string based on the XML value.
> 
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
>   src/qemu/qemu_command.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

ACK

> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index f37aecda37..3806cbbaf9 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -1303,7 +1303,7 @@ qemuCheckDiskConfig(virDomainDiskDefPtr disk,
>               disk->bus != VIR_DOMAIN_DISK_BUS_SCSI) {
>               virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
>                              _("disk device='lun' is not supported for bus='%s'"),
> -                           virDomainDiskQEMUBusTypeToString(disk->bus));
> +                           virDomainDiskBusTypeToString(disk->bus));
>               return -1;
>           }
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list