函数逻辑报告 | 
Source Code:block\partitions\efi.c | 
Create Date:2022-07-27 19:07:11 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:mpare_gpts() - Search disk for valid GPT headers and PTEs*@pgpt: primary GPT header*@agpt: alternate GPT header*@lastlba: last LBA number* Description: Returns nothing. Sanity checks pgpt and agpt fields* and prints warnings on discrepancies.
函数原型:static void compare_gpts(gpt_header *pgpt, gpt_header *agpt, u64 lastlba)
返回类型:void
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| gpt_header * | pgpt | |
| gpt_header * | agpt | |
| u64 | lastlba | 
| 485 | error_found等于0 | 
| 488 | 如果le64_to_cpu(my_lba)不等于le64_to_cpu(alternate_lba)则 | 
| 489 | 打印警告信息("GPT:Primary header LBA != Alt. header alternate_lba\n") | 
| 490 | 打印警告信息("GPT:%lld != %lld\n", (unsignedlonglong)le64_to_cpu(my_lba), (unsignedlonglong)le64_to_cpu(alternate_lba)) | 
| 493 | error_found自加 | 
| 495 | 如果le64_to_cpu(alternate_lba)不等于le64_to_cpu(my_lba)则 | 
| 496 | 打印警告信息("GPT:Primary header alternate_lba != Alt. header my_lba\n") | 
| 497 | 打印警告信息("GPT:%lld != %lld\n", (unsignedlonglong)le64_to_cpu(alternate_lba), (unsignedlonglong)le64_to_cpu(my_lba)) | 
| 500 | error_found自加 | 
| 502 | 如果le64_to_cpu(first_usable_lba)不等于le64_to_cpu(first_usable_lba)则 | 
| 504 | 打印警告信息("GPT:first_usable_lbas don't match.\n") | 
| 505 | 打印警告信息("GPT:%lld != %lld\n", (unsignedlonglong)le64_to_cpu(first_usable_lba), (unsignedlonglong)le64_to_cpu(first_usable_lba)) | 
| 508 | error_found自加 | 
| 510 | 如果le64_to_cpu(last_usable_lba)不等于le64_to_cpu(last_usable_lba)则 | 
| 512 | 打印警告信息("GPT:last_usable_lbas don't match.\n") | 
| 513 | 打印警告信息("GPT:%lld != %lld\n", (unsignedlonglong)le64_to_cpu(last_usable_lba), (unsignedlonglong)le64_to_cpu(last_usable_lba)) | 
| 516 | error_found自加 | 
| 518 | 如果efi_guidcmp(disk_guid, disk_guid)则 | 
| 519 | 打印警告信息("GPT:disk_guids don't match.\n") | 
| 520 | error_found自加 | 
| 524 | 打印警告信息("GPT:num_partition_entries don't match: 0x%x != 0x%x\n", le32_to_cpu(num_partition_entries), le32_to_cpu(num_partition_entries)) | 
| 528 | error_found自加 | 
| 532 | 打印警告信息("GPT:sizeof_partition_entry values don't match: 0x%x != 0x%x\n", le32_to_cpu(sizeof_partition_entry), le32_to_cpu(sizeof_partition_entry)) | 
| 536 | error_found自加 | 
| 540 | 打印警告信息("GPT:partition_entry_array_crc32 values don't match: 0x%x != 0x%x\n", le32_to_cpu(partition_entry_array_crc32), le32_to_cpu(partition_entry_array_crc32)) | 
| 544 | error_found自加 | 
| 546 | 如果le64_to_cpu(alternate_lba)不等于lastlba则 | 
| 547 | 打印警告信息("GPT:Primary header thinks Alt. header is not at the end of the disk.\n") | 
| 548 | 打印警告信息("GPT:%lld != %lld\n", (unsignedlonglong)le64_to_cpu(alternate_lba), (unsignedlonglong)lastlba) | 
| 551 | error_found自加 | 
| 554 | 如果le64_to_cpu(my_lba)不等于lastlba则 | 
| 555 | 打印警告信息("GPT:Alternate GPT header not at the end of the disk.\n") | 
| 556 | 打印警告信息("GPT:%lld != %lld\n", (unsignedlonglong)le64_to_cpu(my_lba), (unsignedlonglong)lastlba) | 
| 559 | error_found自加 | 
| 562 | 如果error_found则打印警告信息("GPT: Use GNU Parted to correct GPT errors.\n") | 
| 564 | 返回 | 
| 名称 | 描述 | 
|---|---|
| find_valid_gpt | d_valid_gpt() - Search disk for valid GPT headers and PTEs*@state: disk parsed partitions*@gpt: GPT header ptr, filled on return.*@ptes: PTEs ptr, filled on return.* Description: Returns 1 if valid, 0 on error. | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |