函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:init\do_mounts_initrd.c Create Date:2022-07-27 15:21:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:handle_initrd

函数原型:static void __init handle_initrd(void)

返回类型:void

参数:

63  static char * argv[] = {"linuxrc", NULL, }
67  do_proc_dointvec cannot handle kdev_t 等于new_encode_dev(ROOT_DEV)
68  create_dev("/dev/root.old", Root_RAM0)
70  mount_block_root("/dev/root.old", root_mountflags & ~Mount read-only )
71  ksys_mkdir("/old", 0700)
72  ksys_chdir("/old")
78  flags或等于Freezer should not count it as freezable
80  info等于all_usermodehelper_setup - prepare to call a usermode helper*@path: path to usermode executable*@argv: arg vector for process*@envp: environment for process*@gfp_mask: gfp mask for memory allocation*@cleanup: a cleanup function*@init: an init
82  如果非info则返回
84  all_usermodehelper_exec - start a usermode application*@sub_info: information about the subprocessa*@wait: wait for the application to finish and return status.* when UMH_NO_WAIT don't wait at all, but you get no useful error back
86  flags与等于Freezer should not count it as freezable 的反
89  do_mount("..", ".", NULL, MS_MOVE, NULL)
91  ksys_chroot("..")
93  如果new_decode_dev(do_proc_dointvec cannot handle kdev_t )恒等于Root_RAM0
94  ksys_chdir("/old")
95  返回
98  ksys_chdir("/")
99  ROOT_DEV等于new_decode_dev(do_proc_dointvec cannot handle kdev_t )
100  mount_root()
102  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
103  error等于do_mount("/old", "/root/initrd", NULL, MS_MOVE, NULL)
104  如果非errorprintk - 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
106  否则
107  fd等于ksys_open("/dev/root.old", O_RDWR, 0)
108  如果error恒等于负ENOENTprintk - 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
110  否则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
112  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
113  Kernel code should not call syscalls (i.e., sys_xyzyyz()) directly.* Instead, use one of the functions which work equivalently, such as* the ksys_xyzyyz() functions prototyped below.
114  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
115  如果fd小于0则
116  error等于fd
117  否则
121  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
调用者
名称描述
initrd_load