函数逻辑报告 | 
Source Code:block\partitions\ldm.c | 
Create Date:2022-07-27 19:02:40 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:ldm_parse_privhead - Read the LDM Database PRIVHEAD structure*@data: Raw database PRIVHEAD structure loaded from the device*@ph: In-memory privhead structure in which to return parsed information* This parses the LDM database PRIVHEAD structure supplied
函数原型:static bool ldm_parse_privhead(const u8 *data, struct privhead *ph)
返回类型:bool
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| const u8 * | data | |
| struct privhead * | ph | 
| 69 | bool is_vista = false | 
| 72 | 如果PRIVHEAD 不等于get_unaligned_be64(data)则 | 
| 73 | ldm_error("Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting.") | 
| 75 | 返回:false | 
| 77 | Offsets and sizes are in sectors. 等于get_unaligned_be16(data + 0x000C) | 
| 78 | ver_minor等于get_unaligned_be16(data + 0x000E) | 
| 79 | logical_disk_start等于get_unaligned_be64(data + 0x011B) | 
| 80 | logical_disk_size等于get_unaligned_be64(data + 0x0123) | 
| 81 | config_start等于get_unaligned_be64(data + 0x012B) | 
| 82 | config_size等于get_unaligned_be64(data + 0x0133) | 
| 84 | 如果Offsets and sizes are in sectors. 恒等于2且ver_minor恒等于12则is_vista = true | 
| 86 | 如果非is_vista且Offsets and sizes are in sectors. 不等于2或ver_minor不等于11的值则 | 
| 87 | ldm_error("Expected PRIVHEAD version 2.11 or 2.12, got %d.%d. Aborting.", Offsets and sizes are in sectors. , ver_minor) | 
| 89 | 返回:false | 
| 93 | 如果config_size不等于Size in sectors (= 1MiB). 则 | 
| 95 | ldm_info("Database is normally %u bytes, it claims to be %llu bytes.", Size in sectors (= 1MiB). , (unsignedlonglong)config_size) | 
| 101 | ldm_error("PRIVHEAD disk size doesn't match real disk size") | 
| 102 | 返回:false | 
| 104 | 如果uuid_parse(data + 0x0030, & disk_id)则 | 
| 105 | ldm_error("PRIVHEAD contains an invalid GUID.") | 
| 106 | 返回:false | 
| 109 | 返回:true | 
| 名称 | 描述 | 
|---|---|
| ldm_validate_privheads | ldm_validate_privheads - Compare the primary privhead with its backups*@state: Partition check state including device holding the LDM Database*@ph1: Memory struct to fill with ph contents* Read and compare all three privheads from disk | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |