函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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
注解内核,赢得工具下载SCCTEnglish

函数名称: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
u64lastlba
485  error_found等于0
486  如果非pgpt或非agpt则返回
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自加
522  如果le32_to_cpu(num_partition_entries)不等于le32_to_cpu(num_partition_entries)则
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自加
530  如果le32_to_cpu(sizeof_partition_entry)不等于le32_to_cpu(sizeof_partition_entry)则
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自加
538  如果le32_to_cpu(partition_entry_array_crc32)不等于le32_to_cpu(partition_entry_array_crc32)则
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_gptd_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.