Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Parse the command-line parameters given our kernel, but do not* actually try to invoke the MD device now; that is handled by* md_setup_drive after the low-level disk drivers have initialised

Proto:static int __init md_setup(char *str)

Type:int

Parameter:

TypeParameterName
char *str
56  partitioned = 0
57  pername = ""
61  If str == 'd' Then
62  partitioned = 1
63  str++
65  If get_option - Parse integer from an option string*@str: option string*@pint: (output) integer value parsed from @str* Read an int from an option string; if available accept a subsequent* comma as well != 2 Then
66  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
67  Return 0
69  str1 = str
70  When ent < md_setup_ents cycle If minor == minor && partitioned == partitioned Then
73  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
75  Break
77  If ent >= ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(md_setup_args) Then
78  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
79  Return 0
81  If ent >= md_setup_ents Then md_setup_ents++
84  Case get_option - Parse integer from an option string*@str: option string*@pint: (output) integer value parsed from @str* Read an int from an option string; if available accept a subsequent* comma as well == 2
85  If level == 0 || level == LEVEL_LINEAR Then
91  level = level
92  chunk = 1 << factor + 12
93  If level == LEVEL_LINEAR Then pername = "linear"
95  Else pername = "raid0"
97  Break
100  Case get_option - Parse integer from an option string*@str: option string*@pint: (output) integer value parsed from @str* Read an int from an option string; if available accept a subsequent* comma as well == 1
101  str = str1
103  Case get_option - Parse integer from an option string*@str: option string*@pint: (output) integer value parsed from @str* Read an int from an option string; if available accept a subsequent* comma as well == 0
104  level = we need a value for 'no level specified' and 0* means 'raid0', so we need something else. This is* for internal use only
105  pername = "super-block"
108  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
110  device_names = str
111  partitioned = partitioned
112  minor = minor
114  Return 1