]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
init: INITRAMFS_PRESERVE_MTIME should depend on BLK_DEV_INITRD
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 15 Sep 2025 07:11:05 +0000 (09:11 +0200)
committerChristian Brauner <brauner@kernel.org>
Mon, 15 Sep 2025 13:02:17 +0000 (15:02 +0200)
INITRAMFS_PRESERVE_MTIME is only used in init/initramfs.c and
init/initramfs_test.c.  Hence add a dependency on BLK_DEV_INITRD, to
prevent asking the user about this feature when configuring a kernel
without initramfs support.

Fixes: 1274aea127b2e8c9 ("initramfs: add INITRAMFS_PRESERVE_MTIME Kconfig option")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
init/Kconfig

index 83632025121937527523f5977a493bd3ae24ed9f..096726e9c95c588765aa6b7fd6494f42bb81ffcc 100644 (file)
@@ -1497,6 +1497,7 @@ config BOOT_CONFIG_EMBED_FILE
 
 config INITRAMFS_PRESERVE_MTIME
        bool "Preserve cpio archive mtimes in initramfs"
+       depends on BLK_DEV_INITRD
        default y
        help
          Each entry in an initramfs cpio archive carries an mtime value. When