diff options
| author | Falk Bauer <falkbauer.git@gmail.com> | 2025-08-21 09:09:44 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-08-25 17:47:20 +0100 |
| commit | 47b1a709ab0a10df07f2fa66e35dd3822c397cdf (patch) | |
| tree | 9a866f081f48052d80a737e472fefa97c57ec6c0 | |
| parent | 0a8268ebd014321b22603ce0623e0f6c726e99d5 (diff) | |
| download | poky-47b1a709ab0a10df07f2fa66e35dd3822c397cdf.tar.gz | |
psplash: Do not mount PSPLASH_FIFO_DIR if the env variable is empty
The script file psplash.sh tries to mount the PSPLASH_FIFO_DIR variable.
If the variable is empty, the mountpoint command returns a usage text
(busybox mountpoint here, util-linux mountpoint behaves the same):
BusyBox v1.37.0 () multi-call binary.
Usage: mountpoint [-q] { [-dn] DIR | -x DEVICE } :~# BusyBox v1.37.0
() multi-call binary
The return code with this console output is 0 and the mount command in the
if statement is executed.
Then this mount also fails with an empty mountpoint argument.
The source code of psplash respects an empty PSPLASH_FIFO_DIR variable
(see psplash.c) and makes a fallback to "/run". So the psplash.sh script should
also respect the empty var.
Try to mount the PSPLASH_FIFO_DIR only if the variable is not empty.
(From OE-Core rev: 85a5e562c5969c407a222966ccb3170cb41fed2f)
Signed-off-by: Falk Bauer <falkbauer.git@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/psplash/files/psplash-init | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/recipes-core/psplash/files/psplash-init b/meta/recipes-core/psplash/files/psplash-init index e0f80bcdc0..69496a48bf 100644 --- a/meta/recipes-core/psplash/files/psplash-init +++ b/meta/recipes-core/psplash/files/psplash-init | |||
| @@ -26,9 +26,11 @@ for x in $CMDLINE; do | |||
| 26 | esac | 26 | esac |
| 27 | done | 27 | done |
| 28 | 28 | ||
| 29 | [ -d $PSPLASH_FIFO_DIR ] || mkdir -p $PSPLASH_FIFO_DIR | 29 | if [ -n "${PSPLASH_FIFO_DIR}" ]; then |
| 30 | if ! mountpoint -q $PSPLASH_FIFO_DIR; then | 30 | [ -d $PSPLASH_FIFO_DIR ] || mkdir -p $PSPLASH_FIFO_DIR |
| 31 | mount tmpfs -t tmpfs $PSPLASH_FIFO_DIR -o,size=40k | 31 | if ! mountpoint -q $PSPLASH_FIFO_DIR ; then |
| 32 | mount tmpfs -t tmpfs $PSPLASH_FIFO_DIR -o,size=40k | ||
| 33 | fi | ||
| 32 | fi | 34 | fi |
| 33 | 35 | ||
| 34 | rotation=0 | 36 | rotation=0 |
