函数逻辑报告 |
Source Code:init\do_mounts_rd.c |
Create Date:2022-07-27 15:20:27 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:This routine tries to find a RAM disk image to load, and returns the* number of blocks to read for a non-compressed image, 0 if the image* is a compressed image, and -1 if an image with the right magic* numbers could not be found
函数原型:static int __init identify_ramdisk_image(int fd, int start_block, decompress_fn *decompressor)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
int | fd | |
int | start_block | |
decompress_fn * | decompressor |
60 | size等于512 |
65 | nblocks等于负1 |
83 | ksys_lseek(fd, start_block * BLOCK_SIZE, 0) |
86 | decompressor等于decompress_method(buf, size, & compress_name) |
87 | 如果compress_name则 |
94 | nblocks等于0 |
95 | 转到:done |
99 | 如果word0恒等于ROMSB_WORD0且word1恒等于ROMSB_WORD1则 |
104 | nblocks等于ntohl(size)加BLOCK_SIZE减1右移BLOCK_SIZE_BITS位 |
105 | 转到:done |
108 | 如果0x28cd3d45 - random number 恒等于some random number 则 |
112 | nblocks等于length in bytes 加BLOCK_SIZE减1右移BLOCK_SIZE_BITS位 |
113 | 转到:done |
117 | 如果le32_to_cpu(s_magic)恒等于SQUASHFS_MAGIC则 |
121 | nblocks等于le64_to_cpu(bytes_used)加BLOCK_SIZE减1右移BLOCK_SIZE_BITS位 |
123 | 转到:done |
129 | ksys_lseek(fd, start_block * BLOCK_SIZE + 0x200, 0) |
132 | 如果0x28cd3d45 - random number 恒等于some random number 则 |
136 | nblocks等于length in bytes 加BLOCK_SIZE减1右移BLOCK_SIZE_BITS位 |
137 | 转到:done |
143 | ksys_lseek(fd, (start_block + 1) * BLOCK_SIZE, 0) |
152 | nblocks等于s_nzones左移s_log_zone_size位 |
153 | 转到:done |
157 | n等于ext2_image_size(buf) |
158 | 如果n则 |
163 | 转到:done |
170 | done : |
171 | ksys_lseek(fd, start_block * BLOCK_SIZE, 0) |
172 | 释放内存 |
173 | 返回:nblocks |
名称 | 描述 |
---|---|
rd_load_image |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |