chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nspawn: make -U a tiny bit smarter
[elogind.git]
/
src
/
basic
/
login-util.h
diff --git
a/src/basic/login-util.h
b/src/basic/login-util.h
index a79f20c1b1e6b1a3f507de8125effeae0ae4e748..89a337d7c1fc1c39c9745268169628b3dcc032ea 100644
(file)
--- a/
src/basic/login-util.h
+++ b/
src/basic/login-util.h
@@
-1,5
+1,3
@@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
/***
This file is part of systemd.
/***
This file is part of systemd.
@@
-22,5
+20,10
@@
#pragma once
#include <stdbool.h>
#pragma once
#include <stdbool.h>
+#include <unistd.h>
bool session_id_valid(const char *id);
bool session_id_valid(const char *id);
+
+static inline bool logind_running(void) {
+ return access("/run/systemd/seats/", F_OK) >= 0;
+}