Function report |
Source Code:lib\earlycpio.c |
Create Date:2022-07-28 06:14:48 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:pio_data find_cpio_data - Search for files in an uncompressed cpio*@path: The directory to search for, including a slash at the end*@data: Pointer to the the cpio archive or a header inside*@len: Remaining length of the cpio based on data
Proto:struct cpio_data find_cpio_data(const char *path, void *data, size_t len, long *nextoff)
Type:struct cpio_data
Parameter:
Type | Parameter | Name |
---|---|---|
const char * | path | |
void * | data | |
size_t | len | |
long * | nextoff |
62 | cpio_header_len = 8 * C_NFIELDS - 2 |
67 | mypathsize = strlen(path) |
72 | When len > cpio_header_len cycle |
73 | If Not p Then |
80 | j = 6 |
109 | len -= cpio_header_len |
111 | dptr = PTR_ALIGN(p + ch[C_NAMESIZE], 4) |
112 | nptr = PTR_ALIGN(dptr + ch[C_FILESIZE], 4) |
117 | If (ch[C_MODE] & 0170000) == 0100000 && ch[C_NAMESIZE] >= mypathsize && Not memcmp(p, path, mypathsize) Then |
124 | If ch[C_NAMESIZE] - mypathsize >= MAX_CPIO_FILE_NAME Then |
125 | pr_warn("File %s exceeding MAX_CPIO_FILE_NAME [%d]\n", p, MAX_CPIO_FILE_NAME) |
132 | size = ch[C_FILESIZE] |
133 | Return cd |
139 | quit : |
140 | Return cd |
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 |