Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:s_parse - Parse a filesystem configuration parameter*@fc: The filesystem context to log errors through

Proto:int fs_parse(struct fs_context *fc, const struct fs_parameter_description *desc, struct fs_parameter *param, struct fs_parse_result *result)

Type:int

Parameter:

TypeParameterName
struct fs_context *fc
const struct fs_parameter_description *desc
struct fs_parameter *param
struct fs_parse_result *result
86  ret = -Parameter not supported
88  T if value supplied to param = Not Not string
89  T if param was "noxxx" = false
90  For spec_u64 = 0
92  p = fs_lookup_key(desc, Parameter name )
93  If Not p Then
98  If T if value supplied to param Then Go to unknown_parameter
100  If Parameter name [0] != 'n' || Parameter name [1] != 'o' || Not Parameter name [2] Then Go to unknown_parameter
103  p = fs_lookup_key(desc, Parameter name + 2)
104  If Not p Then Go to unknown_parameter
106  If Not (flags & "noxxx" is negative param ) Then Go to unknown_parameter
108  For spec_bool = false
109  T if param was "noxxx" = true
112  If flags & The param is deprecated Then warnf - Store supplementary warning message*@fc: The context in which to log the error message*@fmt: The format string* Store the supplementary warning message for the process if the process has* enabled the facility.(fc, "%s: Deprecated parameter '%s'", Name for logging purposes , Parameter name )
116  If T if param was "noxxx" Then Go to okay
121  Case The desired parameter type == __fs_param_wasnt_defined
122  Return -EINVAL
123  Case The desired parameter type == fs_param_is_u32
124  Case The desired parameter type == fs_param_is_u32_octal
125  Case The desired parameter type == fs_param_is_u32_hex
126  Case The desired parameter type == fs_param_is_s32
127  Case The desired parameter type == fs_param_is_u64
128  Case The desired parameter type == fs_param_is_enum
129  Case The desired parameter type == fs_param_is_string
130  If The type of value here != Value is a string Then Go to bad_value
133  If flags & The value is optional Then Go to okay
135  Go to bad_value
138  Default
139  Break
151  For spec_bool = true
152  Go to okay
157  For spec_bool = true
158  Go to okay
160  If size == 0 Then
161  For spec_bool = true
162  Go to okay
165  If b == -1 Then Go to bad_value
167  For spec_bool = b
168  Go to okay
169  Default
170  Go to bad_value
175  Go to maybe_okay
178  Go to maybe_okay
181  Go to maybe_okay
184  Go to maybe_okay
187  Go to maybe_okay
190  When name[0] cycle
197  Go to bad_value
200  Go to okay
204  Go to okay
217  Default
218  Go to bad_value
223  Go to maybe_okay
226  Case The desired parameter type == fs_param_is_blockdev
227  Case The desired parameter type == fs_param_is_path
228  Go to okay
229  Default
230  BUG()
233  maybe_okay :
234  If ret < 0 Then Go to bad_value
236  okay :
237  Return Option number (returned by fs_parse())
239  bad_value :
240  Return valf - Store supplementary invalid argument error message*@fc: The context in which to log the error message*@fmt: The format string* Store the supplementary error message for the process if the process has* enabled the facility and return -EINVAL.(fc, "%s: Bad value for '%s'", Name for logging purposes , Parameter name )
241  unknown_parameter :
242  Return -Parameter not supported
Caller
NameDescribe
cgroup1_parse_param
bpf_parse_param
smack_fs_context_parse_paramsmack_fs_context_parse_param - Parse a single mount parameter*@fc: The new filesystem context being constructed.*@param: The parameter.* Returns 0 on success, -ENOPARAM to pass the parameter on or anything else on* error.
ramfs_parse_param