Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:do_mount_root

Proto:static int __init do_mount_root(const char *name, const char *fs, const int flags, const void *data)

Type:int

Parameter:

TypeParameterName
const char *name
const char *fs
const intflags
const void *data
394  struct page * p = NULL
395  char * data_page = NULL
398  If data Then
400  p = alloc_page(GFP_KERNEL)
401  If Not p Then Return -ENOMEM
403  data_page = page_address(p)
405  strncpy(data_page, data, PAGE_SIZE)
408  ret = do_mount(name, "/root", fs, flags, data_page)
409  If ret Then Go to out
412  ksys_chdir("/root")
413  s = d_sb
414  ROOT_DEV = search index; _not_ kdev_t
415  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
421  out :
422  If p Then put_page(p)
424  Return ret
Caller
NameDescribe
mount_block_root