Function report |
Source Code:fs\fs_context.c |
Create Date:2022-07-28 20:13:06 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Add a parameter to a legacy config. We build up a comma-separated list of* options.
Proto:static int legacy_parse_param(struct fs_context *fc, struct fs_parameter *param)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct fs_context * | fc | |
| struct fs_parameter * | param |
| 559 | ctx = fs_private |
| 561 | len = 0 |
| 563 | If strcmp(Parameter name , "source") == 0 Then |
| 569 | string = NULL |
| 570 | Return 0 |
| 573 | If param_type == LEGACY_FS_MONOLITHIC_PARAMS Then 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, "VFS: Legacy: Can't mix monolithic and individual options") |
| 577 | Case The type of value here == Value is a string |
| 580 | Case The type of value here == Value not given a value |
| 582 | Break |
| 583 | Default |
| 584 | 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, "VFS: Legacy: Parameter type for '%s' not supported", Parameter name ) |
| 588 | If len > PAGE_SIZE - 2 - size Then 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, "VFS: Legacy: Cumulative options too large") |
| 595 | If Not Data page for legacy filesystems Then |
| 597 | If Not Data page for legacy filesystems Then Return -ENOMEM |
| 601 | Data page for legacy filesystems [size++] = ',' |
| 603 | memcpy( Data page for legacy filesystems + size, Parameter name , len) |
| 605 | If The type of value here == Value is a string Then |
| 606 | Data page for legacy filesystems [size++] = '=' |
| 607 | memcpy( Data page for legacy filesystems + size, string, size) |
| 610 | Data page for legacy filesystems [size] = '\0' |
| 613 | Return 0 |
| 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 |