util: move logind_running() to login-util.[ch]
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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); \
|
||||
|
||||
Reference in New Issue
Block a user