From c8fb30409d501e5d9299ac7c08c43917b199a72b Mon Sep 17 00:00:00 2001 Message-Id: From: Pavel Hrdina Date: Fri, 19 Feb 2021 13:33:52 +0100 Subject: [PATCH] virsystemd: export virSystemdHasMachined MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pavel Hrdina Reviewed-by: Michal Privoznik (cherry picked from commit a51147d9065217d9087449b4e601e3294c0a22cf) Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1798463 Signed-off-by: Pavel Hrdina Message-Id: <9a861adc0dc51679d7178e464255c80465247333.1613737828.git.phrdina@redhat.com> Reviewed-by: Ján Tomko --- src/libvirt_private.syms | 1 + src/util/virsystemd.c | 2 +- src/util/virsystemd.h | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 9d87e2a27b..a869d1f7a4 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -3243,6 +3243,7 @@ virSystemdGetActivation; virSystemdGetMachineNameByPID; virSystemdHasLogind; virSystemdHasLogindResetCachedValue; +virSystemdHasMachined; virSystemdHasMachinedResetCachedValue; virSystemdMakeScopeName; virSystemdMakeSliceName; diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c index 96d43e5440..ca708cd1bd 100644 --- a/src/util/virsystemd.c +++ b/src/util/virsystemd.c @@ -153,7 +153,7 @@ void virSystemdHasLogindResetCachedValue(void) * -1 = error * 0 = machine1 is available */ -static int +int virSystemdHasMachined(void) { int ret; diff --git a/src/util/virsystemd.h b/src/util/virsystemd.h index dfea75948b..9ce16b7de1 100644 --- a/src/util/virsystemd.h +++ b/src/util/virsystemd.h @@ -57,6 +57,8 @@ int virSystemdTerminateMachine(const char *name); void virSystemdNotifyStartup(void); +int virSystemdHasMachined(void); + int virSystemdHasLogind(void); int virSystemdCanSuspend(bool *result); -- 2.30.0