aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--README4
-rw-r--r--SECURITY.md13
-rw-r--r--configure.ac8
-rw-r--r--psplash-config.h5
-rw-r--r--psplash-fb.c6
-rw-r--r--psplash.c21
7 files changed, 51 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am
index 5f3fc42..310e126 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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)
diff --git a/README b/README
index 8779a38..23d5bcd 100644
--- a/README
+++ b/README
@@ -19,10 +19,10 @@ Please refer to
for some useful guidelines to be followed when submitting patches.
Mailing list:
- https://lists.yoctoproject.org/listinfo/yocto
+ https://lists.yoctoproject.org/g/yocto
When creating patches, please use something like:
git format-patch -M -s --subject-prefix='psplash][PATCH' origin
When sending patches, please use something like:
- git send-email --to yocto@yoctoproject.org <generated patch>
+ git send-email --to yocto@lists.yoctoproject.org <generated patch>
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 0000000..7ccecc1
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,13 @@
+How to Report a Potential Vulnerability?
+========================================
+
+If you would like to report a public issue (for example, one with a released
+CVE number), please report it using the
+[https://bugzilla.yoctoproject.org/enter_bug.cgi?product=Security Security Bugzilla].
+If you have a patch ready, submit it following the same procedure as any other
+patch as described in README.md.
+
+If you are dealing with a not-yet released or urgent issue, please send a
+message to security AT yoctoproject DOT org, including as many details as
+possible: the layer or software module affected, the recipe and its version,
+and any example code, if available.
diff --git a/configure.ac b/configure.ac
index 2d836a1..2a7da91 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,14 @@ AS_IF([test x$disable_startup_msg = xtrue], [
EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_DISABLE_STARTUP_MSG"
])
+AC_ARG_ENABLE([progress-bar],
+ AS_HELP_STRING([--disable-progress-bar], [Disable progress bar]),
+ [disable_progress_bar=true],
+ [disable_progress_bar=false])
+AS_IF([test x$disable_progress_bar = xtrue], [
+ EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_DISABLE_PROGRESS_BAR"
+])
+
AC_ARG_ENABLE([img-fullscreen],
AS_HELP_STRING([--enable-img-fullscreen], [Enable the logo image in fullscreen mode)]),
[img_fullscreen=true],
diff --git a/psplash-config.h b/psplash-config.h
index 0ba8440..eb90ef3 100644
--- a/psplash-config.h
+++ b/psplash-config.h
@@ -21,6 +21,11 @@
#define PSPLASH_IMG_FULLSCREEN 0
#endif
+/* Bool indicated if the progress bar should be disabled */
+#ifndef PSPLASH_DISABLE_PROGRESS_BAR
+#define PSPLASH_SHOW_PROGRESS_BAR 1
+#endif
+
/* Position of the image split from top edge, numerator of fraction */
#define PSPLASH_IMG_SPLIT_NUMERATOR 5
diff --git a/psplash-fb.c b/psplash-fb.c
index 6603572..2babb5f 100644
--- a/psplash-fb.c
+++ b/psplash-fb.c
@@ -197,7 +197,8 @@ psplash_fb_new (int angle, int fbdev_id)
/* Setup double virtual resolution for double buffering */
if (ioctl(fb->fd, FBIOPAN_DISPLAY, &fb_var) == -1) {
- fprintf(stderr, "FBIOPAN_DISPLAY not supported, double buffering disabled");
+ fprintf(stderr, "warning: FBIOPAN_DISPLAY not supported, "
+ "double buffering disabled\n");
} else {
if (fb_var.yres_virtual == fb_var.yres * 2) {
DBG("Virtual resolution already double");
@@ -205,7 +206,8 @@ psplash_fb_new (int angle, int fbdev_id)
} else {
fb_var.yres_virtual = fb_var.yres * 2;
if (ioctl(fb->fd, FBIOPUT_VSCREENINFO, &fb_var) == -1) {
- fprintf(stderr, "FBIOPUT_VSCREENINFO failed, double buffering disabled");
+ fprintf(stderr, "warning: FBIOPUT_VSCREENINFO failed, "
+ "double buffering disabled\n");
} else {
if (ioctl(fb->fd, FBIOGET_FSCREENINFO, &fb_fix) == -1) {
perror(" Error getting the fixed framebuffer info");
diff --git a/psplash.c b/psplash.c
index e5dff16..ee1af6b 100644
--- a/psplash.c
+++ b/psplash.c
@@ -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) \
@@ -58,6 +61,7 @@ psplash_draw_msg (PSplashFB *fb, const char *msg)
msg);
}
+#ifdef PSPLASH_SHOW_PROGRESS_BAR
void
psplash_draw_progress (PSplashFB *fb, int value)
{
@@ -92,6 +96,7 @@ psplash_draw_progress (PSplashFB *fb, int value)
DBG("value: %i, width: %i, barwidth :%i\n", value,
width, barwidth);
}
+#endif /* PSPLASH_SHOW_PROGRESS_BAR */
static int
parse_command (PSplashFB *fb, char *string)
@@ -105,20 +110,22 @@ parse_command (PSplashFB *fb, char *string)
command = strtok(string," ");
- if (!strcmp(command,"PROGRESS"))
+ if (!strcmp(command,"MSG"))
{
char *arg = strtok(NULL, "\0");
if (arg)
- psplash_draw_progress (fb, atoi(arg));
+ psplash_draw_msg (fb, arg);
}
- else if (!strcmp(command,"MSG"))
+ #ifdef PSPLASH_SHOW_PROGRESS_BAR
+ else if (!strcmp(command,"PROGRESS"))
{
char *arg = strtok(NULL, "\0");
if (arg)
- psplash_draw_msg (fb, arg);
+ psplash_draw_progress (fb, atoi(arg));
}
+#endif
else if (!strcmp(command,"QUIT"))
{
return 1;
@@ -285,6 +292,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);
@@ -304,6 +315,7 @@ main (int argc, char** argv)
POKY_IMG_ROWSTRIDE,
POKY_IMG_RLE_PIXEL_DATA);
+#ifdef PSPLASH_SHOW_PROGRESS_BAR
/* Draw progress bar border */
psplash_fb_draw_image (fb,
(fb->width - BAR_IMG_WIDTH)/2,
@@ -315,6 +327,7 @@ main (int argc, char** argv)
BAR_IMG_RLE_PIXEL_DATA);
psplash_draw_progress (fb, 0);
+#endif
#ifdef PSPLASH_STARTUP_MSG
psplash_draw_msg (fb, PSPLASH_STARTUP_MSG);