mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
util: Introduce virSystemdHasResolved
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
3869c2a281
commit
6a5f21632f
@ -3489,6 +3489,8 @@ virSystemdHasLogind;
|
|||||||
virSystemdHasLogindResetCachedValue;
|
virSystemdHasLogindResetCachedValue;
|
||||||
virSystemdHasMachined;
|
virSystemdHasMachined;
|
||||||
virSystemdHasMachinedResetCachedValue;
|
virSystemdHasMachinedResetCachedValue;
|
||||||
|
virSystemdHasResolved;
|
||||||
|
virSystemdHasResolvedResetCachedValue;
|
||||||
virSystemdMakeScopeName;
|
virSystemdMakeScopeName;
|
||||||
virSystemdMakeSliceName;
|
virSystemdMakeSliceName;
|
||||||
virSystemdNotifyStartup;
|
virSystemdNotifyStartup;
|
||||||
|
@ -127,6 +127,7 @@ char *virSystemdMakeSliceName(const char *partition)
|
|||||||
|
|
||||||
static int virSystemdHasMachinedCachedValue = -1;
|
static int virSystemdHasMachinedCachedValue = -1;
|
||||||
static int virSystemdHasLogindCachedValue = -1;
|
static int virSystemdHasLogindCachedValue = -1;
|
||||||
|
static int virSystemdHasResolvedCachedValue = -1;
|
||||||
|
|
||||||
/* Reset the cache from tests for testing the underlying dbus calls
|
/* Reset the cache from tests for testing the underlying dbus calls
|
||||||
* as well */
|
* as well */
|
||||||
@ -140,6 +141,12 @@ void virSystemdHasLogindResetCachedValue(void)
|
|||||||
virSystemdHasLogindCachedValue = -1;
|
virSystemdHasLogindCachedValue = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
virSystemdHasResolvedResetCachedValue(void)
|
||||||
|
{
|
||||||
|
virSystemdHasResolvedCachedValue = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* virSystemdHasService:
|
* virSystemdHasService:
|
||||||
@ -198,6 +205,14 @@ virSystemdHasLogind(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
virSystemdHasResolved(void)
|
||||||
|
{
|
||||||
|
return virSystemdHasService("org.freedesktop.resolve1",
|
||||||
|
&virSystemdHasResolvedCachedValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* virSystemdGetMachineByPID:
|
* virSystemdGetMachineByPID:
|
||||||
* @conn: dbus connection
|
* @conn: dbus connection
|
||||||
|
@ -49,6 +49,8 @@ int virSystemdHasMachined(void);
|
|||||||
|
|
||||||
int virSystemdHasLogind(void);
|
int virSystemdHasLogind(void);
|
||||||
|
|
||||||
|
int virSystemdHasResolved(void);
|
||||||
|
|
||||||
int virSystemdCanSuspend(bool *result);
|
int virSystemdCanSuspend(bool *result);
|
||||||
|
|
||||||
int virSystemdCanHibernate(bool *result);
|
int virSystemdCanHibernate(bool *result);
|
||||||
|
@ -29,3 +29,4 @@
|
|||||||
|
|
||||||
void virSystemdHasMachinedResetCachedValue(void);
|
void virSystemdHasMachinedResetCachedValue(void);
|
||||||
void virSystemdHasLogindResetCachedValue(void);
|
void virSystemdHasLogindResetCachedValue(void);
|
||||||
|
void virSystemdHasResolvedResetCachedValue(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user