[PATCH] conf: fix error message

Anastasia Belova posted 1 patch 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20230807133734.28822-1-abelova@astralinux.ru
src/conf/numa_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] conf: fix error message
Posted by Anastasia Belova 9 months ago
From: Анастасия Белова <abelova@astralinux.ru>

In case of invalid placement its value should
be passed as a parameter of virReportError
instead of mode.

Fixes: 93e82727ec ("numatune: Encapsulate numatune configuration in order to unify results")
Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
---
 src/conf/numa_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c
index a616521763..31b5ea58f6 100644
--- a/src/conf/numa_conf.c
+++ b/src/conf/numa_conf.c
@@ -508,7 +508,7 @@ virDomainNumatuneSet(virDomainNuma *numa,
         (placement < 0 || placement >= VIR_DOMAIN_NUMATUNE_PLACEMENT_LAST)) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                        _("Unsupported numatune placement '%1$d'"),
-                       mode);
+                       placement);
         return -1;
     }
 
-- 
2.30.2
Re: [PATCH] conf: fix error message
Posted by Martin Kletzander 9 months ago
On Mon, Aug 07, 2023 at 04:37:34PM +0300, Anastasia Belova wrote:
>From: Анастасия Белова <abelova@astralinux.ru>
>
>In case of invalid placement its value should
>be passed as a parameter of virReportError
>instead of mode.
>
>Fixes: 93e82727ec ("numatune: Encapsulate numatune configuration in order to unify results")
>Signed-off-by: Anastasia Belova <abelova@astralinux.ru>

Reviewed-by: Martin Kletzander <mkletzan@redhat.com>

and pushed now, thanks.

>---
> src/conf/numa_conf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c
>index a616521763..31b5ea58f6 100644
>--- a/src/conf/numa_conf.c
>+++ b/src/conf/numa_conf.c
>@@ -508,7 +508,7 @@ virDomainNumatuneSet(virDomainNuma *numa,
>         (placement < 0 || placement >= VIR_DOMAIN_NUMATUNE_PLACEMENT_LAST)) {
>         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
>                        _("Unsupported numatune placement '%1$d'"),
>-                       mode);
>+                       placement);
>         return -1;
>     }
>
>-- 
>2.30.2
>