Function report |
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 activity | Download SCCT | Chinese |
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:
| Type | Parameter | Name |
|---|---|---|
| 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 |
| 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 |
| 132 | If Not T if value supplied to param Then |
| 133 | If flags & The value is optional Then Go to okay |
| 135 | Go to bad_value |
| 138 | Default |
| 139 | Break |
| 146 | Case The desired parameter type == fs_param_is_flag |
| 151 | For spec_bool = true |
| 152 | Go to okay |
| 154 | Case The desired parameter type == fs_param_is_bool |
| 156 | Case The type of value here == Value not given a value |
| 157 | For spec_bool = true |
| 158 | Go to okay |
| 159 | Case The type of value here == Value is a string |
| 160 | If size == 0 Then |
| 161 | For spec_bool = true |
| 162 | Go to okay |
| 164 | b = lookup_constant(bool_names, string, - 1) |
| 167 | For spec_bool = b |
| 168 | Go to okay |
| 169 | Default |
| 170 | Go to bad_value |
| 173 | Case The desired parameter type == fs_param_is_u32 |
| 175 | Go to maybe_okay |
| 176 | Case The desired parameter type == fs_param_is_u32_octal |
| 178 | Go to maybe_okay |
| 179 | Case The desired parameter type == fs_param_is_u32_hex |
| 181 | Go to maybe_okay |
| 182 | Case The desired parameter type == fs_param_is_s32 |
| 184 | Go to maybe_okay |
| 185 | Case The desired parameter type == fs_param_is_u64 |
| 187 | Go to maybe_okay |
| 189 | Case The desired parameter type == fs_param_is_enum |
| 191 | If Option number (as fs_parameter_spec::opt) == Option number (returned by fs_parse()) && strcmp(name, string) == 0 Then |
| 194 | Go to okay |
| 197 | Go to bad_value |
| 199 | Case The desired parameter type == fs_param_is_string |
| 200 | Go to okay |
| 201 | Case The desired parameter type == fs_param_is_blob |
| 202 | If The type of value here != Value is a binary blob Then Go to bad_value |
| 204 | Go to okay |
| 206 | Case The desired parameter type == fs_param_is_fd |
| 208 | Case The type of value here == Value is a string |
| 209 | If Not T if value supplied to param Then Go to bad_value |
| 213 | Break |
| 214 | Case The type of value here == Value is a file* |
| 216 | ret = 0 |
| 217 | Default |
| 218 | Go to bad_value |
| 221 | If For spec_u32{,_octal,_hex}/spec_enum > INT_MAX Then 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 : |
| 236 | okay : |
| 237 | Return Option number (returned by fs_parse()) |
| 239 | bad_value : |
| 241 | unknown_parameter : |
| 242 | Return -Parameter not supported |
| Name | Describe |
|---|---|
| cgroup1_parse_param | |
| bpf_parse_param | |
| smack_fs_context_parse_param | smack_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 |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |