[libvirt PATCH 09/15] systemd: check org.freedesktop.machine1 registration

marcandre.lureau at redhat.com marcandre.lureau at redhat.com
Mon Apr 6 21:27:06 UTC 2020


From: Marc-André Lureau <marcandre.lureau at redhat.com>

Since commit f10bd740e178c89f24d0b0298d0b5413537d0699 ("Cache the
presence of machine1 service"), the code checks for systemd1
registration. Not totally unreasonable, but that seems odd since we
actually check machined presence in this function.

Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
---
 src/util/virsystemd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c
index 9a659dad84..74d0d15ca7 100644
--- a/src/util/virsystemd.c
+++ b/src/util/virsystemd.c
@@ -163,7 +163,7 @@ virSystemdHasMachined(void)
         return ret;
     }
 
-    if ((ret = virDBusSystemIsServiceRegistered("org.freedesktop.systemd1")) == -1)
+    if ((ret = virDBusSystemIsServiceRegistered("org.freedesktop.machine1")) == -1)
         return ret;
     g_atomic_int_set(&virSystemdHasMachinedCachedValue, ret);
     return ret;
-- 
2.26.0.rc2.42.g98cedd0233




More information about the libvir-list mailing list