render / rpms / libvirt

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