[PATCH] ch_driver: fix condition in virCHDomainRemoveInactive()

Purna Pavan Chandra Aekkaladevi posted 1 patch 2 months, 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20240129123821.12461-1-paekkaladevi@linux.microsoft.com
src/ch/ch_domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] ch_driver: fix condition in virCHDomainRemoveInactive()
Posted by Purna Pavan Chandra Aekkaladevi 2 months, 4 weeks ago
Rectify the condition to remove a domain only if it is not persistent.

Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkaladevi@linux.microsoft.com>
---
 src/ch/ch_domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ch/ch_domain.c b/src/ch/ch_domain.c
index c0d6c75b1d..2f3fae6758 100644
--- a/src/ch/ch_domain.c
+++ b/src/ch/ch_domain.c
@@ -36,7 +36,7 @@ void
 virCHDomainRemoveInactive(virCHDriver *driver,
                           virDomainObj *vm)
 {
-    if (vm->persistent) {
+    if (!vm->persistent) {
         virDomainObjListRemove(driver->domains, vm);
     }
 }
-- 
2.34.1
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [PATCH] ch_driver: fix condition in virCHDomainRemoveInactive()
Posted by Michal Prívozník 2 months, 3 weeks ago
On 1/29/24 13:38, Purna Pavan Chandra Aekkaladevi wrote:
> Rectify the condition to remove a domain only if it is not persistent.
> 
> Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkaladevi@linux.microsoft.com>
> ---
>  src/ch/ch_domain.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/ch/ch_domain.c b/src/ch/ch_domain.c
> index c0d6c75b1d..2f3fae6758 100644
> --- a/src/ch/ch_domain.c
> +++ b/src/ch/ch_domain.c
> @@ -36,7 +36,7 @@ void
>  virCHDomainRemoveInactive(virCHDriver *driver,
>                            virDomainObj *vm)
>  {
> -    if (vm->persistent) {
> +    if (!vm->persistent) {
>          virDomainObjListRemove(driver->domains, vm);
>      }
>  }

Ooops, yes.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

and merged. Congratulations on your first libvirt contribution!

Michal
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [PATCH] ch_driver: fix condition in virCHDomainRemoveInactive()
Posted by Praveen K Paladugu 2 months, 4 weeks ago
LGTM!

-- 
Regards,
Praveen
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org