logind: Introduce RebootWithFlags and others

Add new systemd-logind WithFlags version for Reboot and others. These
methods add a unit64 parameter, with which can send additional control flags.
This commit is contained in:
Deepak Rawat
2021-02-02 11:55:16 +00:00
committed by Luca Boccassi
parent 77591e9732
commit 8885fed4e3
4 changed files with 142 additions and 16 deletions
+8
View File
@@ -4,6 +4,14 @@
#include <stdbool.h>
#include <unistd.h>
#define SD_LOGIND_ROOT_CHECK_INHIBITORS (UINT64_C(1) << 0)
/* For internal use only */
#define SD_LOGIND_INTERACTIVE (UINT64_C(1) << 63)
#define SD_LOGIND_SHUTDOWN_AND_SLEEP_FLAGS_PUBLIC (SD_LOGIND_ROOT_CHECK_INHIBITORS)
#define SD_LOGIND_SHUTDOWN_AND_SLEEP_FLAGS_ALL (SD_LOGIND_ROOT_CHECK_INHIBITORS|SD_LOGIND_INTERACTIVE)
bool session_id_valid(const char *id);
static inline bool logind_running(void) {