Function report |
Source Code:block\cmdline-parser.c |
Create Date:2022-07-28 18:01:49 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:parse_parts
Proto:static int parse_parts(struct cmdline_parts **parts, const char *bdevdef)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct cmdline_parts ** | parts | |
| const char * | bdevdef |
| 99 | * parts = NULL |
| 101 | newparts = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
| 105 | next = strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for |
| 106 | If Not next Then |
| 111 | length = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(int, next - bdevdef, size of block device, such as 'mmcblk0' - 1) |
| 113 | block device, such as 'mmcblk0' [length] = '\0' |
| 114 | nr_subparts = 0 |
| 116 | next_subpart = subpart |
| 120 | next = strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for |
| 122 | length = If Not next Then size of buf - 1 Else min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(int, next - bdevdef, size of buf - 1) |
| 128 | ret = parse_subpart(next_subpart, buf) |
| 132 | nr_subparts++ |
| 133 | next_subpart = next_subpart |
| 136 | If Not subpart Then |
| 144 | Return 0 |
| 145 | fail : |
| 146 | free_subpart(newparts) |
| 148 | Return ret |
| Name | Describe |
|---|---|
| cmdline_parts_parse |
| 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 |