From a88c8750b3f0618036782b31a184c27c80bcb38d Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Mon, 16 Mar 2015 18:29:26 +0100 Subject: [PATCH] shared - reinstate plymouth_running() This will be used by fsckd. This reverts part of 031886edfc6e96ab778c241035a8d00fb0de99d3. --- src/shared/util.c | 4 ++++ src/shared/util.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/shared/util.c b/src/shared/util.c index 3f3ca90f5..5cbbe8fb7 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -4228,6 +4228,10 @@ bool nulstr_contains(const char*nulstr, const char *needle) { return false; } +bool plymouth_running(void) { + return access("/run/plymouth/pid", F_OK) >= 0; +} + char* strshorten(char *s, size_t l) { assert(s); diff --git a/src/shared/util.h b/src/shared/util.h index 749bd0ea8..d229e1e68 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -549,6 +549,8 @@ int kill_and_sigcont(pid_t pid, int sig); bool nulstr_contains(const char*nulstr, const char *needle); +bool plymouth_running(void); + bool hostname_is_valid(const char *s) _pure_; char* hostname_cleanup(char *s, bool lowercase); -- 2.30.2