Function report |
Source Code:block\cmdline-parser.c |
Create Date:2022-07-28 18:01:42 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:parse_subpart
Proto:static int parse_subpart(struct cmdline_subpart **subpart, char *partdef)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct cmdline_subpart ** | subpart | |
| char * | partdef |
| 13 | ret = 0 |
| 16 | * subpart = NULL |
| 18 | new_subpart = 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). |
| 19 | If Not new_subpart Then Return -ENOMEM |
| 22 | If partdef == '-' Then |
| 25 | Else |
| 34 | If partdef == '@' Then |
| 35 | partdef++ |
| 37 | Else |
| 38 | from = ~0ULL |
| 41 | If partdef == '(' Then |
| 43 | 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 |
| 45 | If Not next Then |
| 51 | 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 - partdef, size of partition name, such as 'rootfs' - 1) |
| 54 | partition name, such as 'rootfs' [length] = '\0' |
| 57 | Else partition name, such as 'rootfs' [0] = '\0' |
| 60 | flags = 0 |
| 63 | flags |= Device is read only |
| 64 | partdef += 2 |
| 69 | partdef += 2 |
| 72 | subpart = new_subpart |
| 73 | Return 0 |
| 74 | fail : |
| 75 | kfree(new_subpart) |
| 76 | Return ret |
| Name | Describe |
|---|---|
| parse_parts |
| 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 |