util: split out plymouth related stuff
This commit is contained in:
parent
94dfd646b3
commit
e56f9ffe51
|
@ -39,11 +39,6 @@
|
|||
#define DEFAULT_SYSTEM_BUS_ADDRESS "unix:path=/run/dbus/system_bus_socket"
|
||||
#define DEFAULT_USER_BUS_ADDRESS_FMT "unix:path=%s/bus"
|
||||
|
||||
#define PLYMOUTH_SOCKET { \
|
||||
.un.sun_family = AF_UNIX, \
|
||||
.un.sun_path = "\0/org/freedesktop/plymouthd", \
|
||||
}
|
||||
|
||||
#define NOTIFY_FD_MAX 768
|
||||
#define NOTIFY_BUFFER_MAX PIPE_BUF
|
||||
|
||||
|
|
|
@ -140,6 +140,8 @@ basic_sources = files('''
|
|||
parse-util.h
|
||||
path-util.c
|
||||
path-util.h
|
||||
plymouth-util.c
|
||||
plymouth-util.h
|
||||
prioq.c
|
||||
prioq.h
|
||||
proc-cmdline.c
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
/* SPDX-License-Identifier: LGPL-2.1+ */
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "plymouth-util.h"
|
||||
|
||||
bool plymouth_running(void) {
|
||||
return access("/run/plymouth/pid", F_OK) >= 0;
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
/* SPDX-License-Identifier: LGPL-2.1+ */
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#define PLYMOUTH_SOCKET { \
|
||||
.un.sun_family = AF_UNIX, \
|
||||
.un.sun_path = "\0/org/freedesktop/plymouthd", \
|
||||
}
|
||||
|
||||
bool plymouth_running(void);
|
|
@ -51,10 +51,6 @@ int saved_argc = 0;
|
|||
char **saved_argv = NULL;
|
||||
static int saved_in_initrd = -1;
|
||||
|
||||
bool plymouth_running(void) {
|
||||
return access("/run/plymouth/pid", F_OK) >= 0;
|
||||
}
|
||||
|
||||
bool display_is_local(const char *display) {
|
||||
assert(display);
|
||||
|
||||
|
|
|
@ -43,8 +43,6 @@ static inline const char* enable_disable(bool b) {
|
|||
return b ? "enable" : "disable";
|
||||
}
|
||||
|
||||
bool plymouth_running(void);
|
||||
|
||||
bool display_is_local(const char *display) _pure_;
|
||||
|
||||
#define NULSTR_FOREACH(i, l) \
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
#include "parse-util.h"
|
||||
#include "path-lookup.h"
|
||||
#include "path-util.h"
|
||||
#include "plymouth-util.h"
|
||||
#include "process-util.h"
|
||||
#include "ratelimit.h"
|
||||
#include "rlimit-util.h"
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "memory-util.h"
|
||||
#include "mkdir.h"
|
||||
#include "path-util.h"
|
||||
#include "plymouth-util.h"
|
||||
#include "pretty-print.h"
|
||||
#include "process-util.h"
|
||||
#include "signal-util.h"
|
||||
|
|
Loading…
Reference in New Issue