summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-24 23:30:40 +0200
committerLennart Poettering <lennart@poettering.net>2015-10-24 23:30:40 +0200
commit00229fe48f7577946bb95dd2b0ca96d8e6447f94 (patch)
treed32caa672ff0bdd905b1976b4030030a2f898528 /src/basic
parent09c76ef618de6d3a095164910ec3c96ec89e4cbc (diff)
util: move logind_running() to login-util.[ch]
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/login-util.h5
-rw-r--r--src/basic/util.h4
2 files changed, 5 insertions, 4 deletions
diff --git a/src/basic/login-util.h b/src/basic/login-util.h
index a79f20c1b1..be5bb64870 100644
--- a/src/basic/login-util.h
+++ b/src/basic/login-util.h
@@ -22,5 +22,10 @@
#pragma once
#include <stdbool.h>
+#include <unistd.h>
bool session_id_valid(const char *id);
+
+static inline bool logind_running(void) {
+ return access("/run/systemd/seats/", F_OK) >= 0;
+}
diff --git a/src/basic/util.h b/src/basic/util.h
index 7d1e4e0f62..d1da9ce106 100644
--- a/src/basic/util.h
+++ b/src/basic/util.h
@@ -617,10 +617,6 @@ static inline unsigned log2u_round_up(unsigned x) {
return log2u(x - 1) + 1;
}
-static inline bool logind_running(void) {
- return access("/run/systemd/seats/", F_OK) >= 0;
-}
-
#define DECIMAL_STR_WIDTH(x) \
({ \
typeof(x) _x_ = (x); \