Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Create a simple rootfs that is similar to the default initramfs

Proto:static int __init default_rootfs(void)

Type:int

Parameter:Nothing

20  err = ksys_mkdir((constchar__user__force * )"/dev", 0755)
21  If err < 0 Then Go to out
24  err = ksys_mknod((constchar__user__force * )"/dev/console", S_IFCHR | S_IRUSR | S_IWUSR, new_encode_dev(MKDEV(5, 1)))
27  If err < 0 Then Go to out
30  err = ksys_mkdir((constchar__user__force * )"/root", 0700)
31  If err < 0 Then Go to out
34  Return 0
36  out :
37  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
38  Return err