mirror of
https://git.yoctoproject.org/psplash
synced 2025-10-14 02:07:26 +08:00
Fix psplash-systemd failures
To avoid racing on FIFO creation between psplash and psplash-systemd, enhance the systemd support by adding a call to sd_notify in psplash after the FIFO is created. That will alow setting the psplash-start systemd unit type to "notify" to avoid the race. Signed-off-by: Scott Murray <scott.murray@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:

committed by
Richard Purdie

parent
4cf1330020
commit
0a902f7cd8
@@ -11,6 +11,8 @@ BUILT_SOURCES = psplash-poky-img.h psplash-bar-img.h
|
||||
psplash_write_SOURCES = psplash-write.c psplash.h
|
||||
|
||||
if HAVE_SYSTEMD
|
||||
psplash_CPPFLAGS = $(SYSTEMD_CFLAGS) -DHAVE_SYSTEMD
|
||||
psplash_LDFLAGS= $(SYSTEMD_LIBS)
|
||||
bin_PROGRAMS += psplash-systemd
|
||||
psplash_systemd_CPPFLAGS = $(SYSTEMD_CFLAGS)
|
||||
psplash_systemd_LDFLAGS= $(SYSTEMD_LIBS)
|
||||
|
@@ -15,6 +15,9 @@
|
||||
#include "psplash-colors.h"
|
||||
#include "psplash-poky-img.h"
|
||||
#include "psplash-bar-img.h"
|
||||
#ifdef HAVE_SYSTEMD
|
||||
#include <systemd/sd-daemon.h>
|
||||
#endif
|
||||
#include FONT_HEADER
|
||||
|
||||
#define SPLIT_LINE_POS(fb) \
|
||||
@@ -285,6 +288,10 @@ main (int argc, char** argv)
|
||||
goto fb_fail;
|
||||
}
|
||||
|
||||
#ifdef HAVE_SYSTEMD
|
||||
sd_notify(0, "READY=1");
|
||||
#endif
|
||||
|
||||
/* Clear the background with #ecece1 */
|
||||
psplash_fb_draw_rect (fb, 0, 0, fb->width, fb->height,
|
||||
PSPLASH_BACKGROUND_COLOR);
|
||||
|
Reference in New Issue
Block a user