util: move logind_running() to login-util.[ch]

This commit is contained in:
Lennart Poettering
2015-10-24 23:30:40 +02:00
parent 09c76ef618
commit 00229fe48f
4 changed files with 20 additions and 17 deletions
+5
View File
@@ -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;
}
-4
View File
@@ -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); \