Module Name:    src
Committed By:   jmmv
Date:           Sun Dec 29 07:28:38 UTC 2024

Modified Files:
        src/sys/dev/splash: files.splash
        src/sys/kern: init_main.c

Log Message:
Fix SPLASHSCREEN_IMAGE handling

This allows a kernel compiled with options:

options         SPLASHSCREEN
makeoptions     SPLASHSCREEN_IMAGE="path/to/image"

to correctly display the built-in image, which was previously failing to be
initialized by init_main.c.  Note that init_main.c was already checking for
makeoptions_SPLASHSCREEN_IMAGE and SPLASHSCREEN_IMAGE inconsistently in two
places, and now it doesn't anymore.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/splash/files.splash
cvs rdiff -u -r1.549 -r1.550 src/sys/kern/init_main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/splash/files.splash
diff -u src/sys/dev/splash/files.splash:1.6 src/sys/dev/splash/files.splash:1.7
--- src/sys/dev/splash/files.splash:1.6	Sat Dec  9 13:25:38 2017
+++ src/sys/dev/splash/files.splash	Sun Dec 29 07:28:38 2024
@@ -1,8 +1,8 @@
-# $NetBSD: files.splash,v 1.6 2017/12/09 13:25:38 jmcneill Exp $
+# $NetBSD: files.splash,v 1.7 2024/12/29 07:28:38 jmmv Exp $
 
 define splash: stbi
 file dev/splash/splash.c	splash & splashscreen
 file splash_image.o		splash & splashscreen
 
 defflag opt_splash.h	SPLASHSCREEN: STB_IMAGE
-defflag opt_splash.h	makeoptions_SPLASHSCREEN_IMAGE
+defparam opt_splash.h	makeoptions_SPLASHSCREEN_IMAGE

Index: src/sys/kern/init_main.c
diff -u src/sys/kern/init_main.c:1.549 src/sys/kern/init_main.c:1.550
--- src/sys/kern/init_main.c:1.549	Tue Mar  5 20:59:41 2024
+++ src/sys/kern/init_main.c	Sun Dec 29 07:28:38 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_main.c,v 1.549 2024/03/05 20:59:41 thorpej Exp $	*/
+/*	$NetBSD: init_main.c,v 1.550 2024/12/29 07:28:38 jmmv Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009, 2019, 2023 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.549 2024/03/05 20:59:41 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.550 2024/12/29 07:28:38 jmmv Exp $");
 
 #include "opt_cnmagic.h"
 #include "opt_ddb.h"
@@ -384,7 +384,7 @@ main(void)
 #endif
 
 
-#if defined(SPLASHSCREEN) && defined(SPLASHSCREEN_IMAGE)
+#if defined(SPLASHSCREEN) && defined(makeoptions_SPLASHSCREEN_IMAGE)
 	size_t splash_size = (&_binary_splash_image_end -
 	    &_binary_splash_image_start) * sizeof(void *);
 	splash_setimage(&_binary_splash_image_start, splash_size);

Reply via email to