render / rpms / libvirt

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