Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:init\do_mounts.c Create Date:2022-07-28 13:57:13
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Prepare the namespace - decide what/where to mount, load ramdisks, etc.

Proto:void __init prepare_namespace(void)

Type:void

Parameter:Nothing

643  If root_delay Then
644  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
646  ssleep(root_delay)
656  wait_for_device_probe()
658  md_run_setup()
660  If saved_root_name[0] Then
661  root_device_name = saved_root_name
662  If Not strncmp(root_device_name, "mtd", 3) || Not strncmp(root_device_name, "ubi", 3) Then
665  Go to out
667  ROOT_DEV = Convert a name into device number
668  If strncmp(root_device_name, "/dev/", 5) == 0 Then root_device_name += 5
672  If initrd_load() Then Go to out
676  If ROOT_DEV == 0 && root_wait Then
677  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
679  When driver_probe_done() != 0 || (ROOT_DEV = Convert a name into device number) == 0 cycle
681  msleep - sleep safely even with waitqueue interruptions*@msecs: Time in milliseconds to sleep for
682  async_synchronize_full - synchronize all asynchronous function calls* This function waits until all asynchronous function calls have been done.
685  is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR
687  If is_floppy && 1 = load RAM disk, 0 = don't load && rd_load_disk(0) Then ROOT_DEV = Root_RAM0
690  mount_root()
691  out :
692  devtmpfs_mount()
693  do_mount(".", "/", NULL, MS_MOVE, NULL)
694  ksys_chroot(".")