diff options
| author | Askar Safin | 2025-11-19 22:24:06 +0000 |
|---|---|---|
| committer | Christian Brauner | 2026-01-12 17:22:22 +0100 |
| commit | c350a65b566b527874b7ace5d904c57c107fae4f (patch) | |
| tree | 96e792ff648df87b318e8fcaed6106c1d91e68f9 /init/do_mounts_rd.c | |
| parent | 7f3b33668595ee48722df86831a1df4ee1192269 (diff) | |
initrd: remove deprecated code path (linuxrc)
Remove linuxrc initrd code path, which was deprecated in 2020.
Initramfs and (non-initial) RAM disks (i. e. brd) still work.
Both built-in and bootloader-supplied initramfs still work.
Non-linuxrc initrd code path (i. e. using /dev/ram as final root
filesystem) still works, but I put deprecation message into it.
Also I deprecate command line parameters "noinitrd" and "ramdisk_start=".
Signed-off-by: Askar Safin <safinaskar@gmail.com>
Link: https://patch.msgid.link/20251119222407.3333257-3-safinaskar@gmail.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'init/do_mounts_rd.c')
| -rw-r--r-- | init/do_mounts_rd.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c index d20fabf2227f..48bfab2fc62f 100644 --- a/init/do_mounts_rd.c +++ b/init/do_mounts_rd.c @@ -22,6 +22,7 @@ int __initdata rd_image_start; /* starting block # of image */ static int __init ramdisk_start_setup(char *str) { + pr_warn("ramdisk_start= option is deprecated and will be removed soon\n"); return kstrtoint(str, 0, &rd_image_start) == 0; } __setup("ramdisk_start=", ramdisk_start_setup); @@ -176,7 +177,7 @@ static unsigned long nr_blocks(struct file *file) return i_size_read(inode) >> 10; } -int __init rd_load_image(char *from) +int __init rd_load_image(void) { int res = 0; unsigned long rd_blocks, devblocks, nr_disks; @@ -190,7 +191,7 @@ int __init rd_load_image(char *from) if (IS_ERR(out_file)) goto out; - in_file = filp_open(from, O_RDONLY, 0); + in_file = filp_open("/initrd.image", O_RDONLY, 0); if (IS_ERR(in_file)) goto noclose_input; @@ -219,10 +220,7 @@ int __init rd_load_image(char *from) /* * OK, time to copy in the data */ - if (strcmp(from, "/initrd.image") == 0) - devblocks = nblocks; - else - devblocks = nr_blocks(in_file); + devblocks = nblocks; if (devblocks == 0) { printk(KERN_ERR "RAMDISK: could not determine device size\n"); @@ -266,13 +264,6 @@ out: return res; } -int __init rd_load_disk(int n) -{ - create_dev("/dev/root", ROOT_DEV); - create_dev("/dev/ram", MKDEV(RAMDISK_MAJOR, n)); - return rd_load_image("/dev/root"); -} - static int exit_code; static int decompress_error; |
