Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

init: don't remove the /dev/ prefix from error messages

Remove the code that drops the /dev/ prefix from root_device_name, which
is only used for error messages when mounting the root device fails.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230531125535.676098-10-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Christoph Hellwig and committed by
Jens Axboe
73231b58 c8643c72

+6 -11
+6 -11
init/do_mounts.c
··· 607 607 */ 608 608 void __init prepare_namespace(void) 609 609 { 610 - char *root_device_name; 611 - 612 610 if (root_delay) { 613 611 printk(KERN_INFO "Waiting %d sec before mounting root device...\n", 614 612 root_delay); ··· 625 627 md_run_setup(); 626 628 627 629 if (saved_root_name[0]) { 628 - root_device_name = saved_root_name; 629 - if (!strncmp(root_device_name, "mtd", 3) || 630 - !strncmp(root_device_name, "ubi", 3)) { 631 - mount_root_generic(root_device_name, root_device_name, 630 + if (!strncmp(saved_root_name, "mtd", 3) || 631 + !strncmp(saved_root_name, "ubi", 3)) { 632 + mount_root_generic(saved_root_name, saved_root_name, 632 633 root_mountflags); 633 634 goto out; 634 635 } 635 - ROOT_DEV = name_to_dev_t(root_device_name); 636 - if (strncmp(root_device_name, "/dev/", 5) == 0) 637 - root_device_name += 5; 636 + ROOT_DEV = name_to_dev_t(saved_root_name); 638 637 } 639 638 640 - if (initrd_load(root_device_name)) 639 + if (initrd_load(saved_root_name)) 641 640 goto out; 642 641 643 642 /* wait for any asynchronous scanning to complete */ ··· 647 652 async_synchronize_full(); 648 653 } 649 654 650 - mount_root(root_device_name); 655 + mount_root(saved_root_name); 651 656 out: 652 657 devtmpfs_mount(); 653 658 init_mount(".", "/", NULL, MS_MOVE, NULL);