函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\partitions\efi.c Create Date:2022-07-27 19:07:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:_partition(struct parsed_partitions *state)*@state: disk parsed partitions* Description: called from check.c, if the disk contains GPT* partitions, sets up partition entries in the kernel.* If the first block on the disk is a legacy MBR,

函数原型:int efi_partition(struct parsed_partitions *state)

返回类型:int

参数:

类型参数名称
struct parsed_partitions *state
680  gpt_header * gpt = NULL
681  gpt_entry * ptes = NULL
683  ssz等于bdev_logical_block_size(bdev)除512
685  如果非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.或非gpt或非ptes
686  释放内存
687  释放内存
688  返回:0
691  pr_debug("GUID Partition Table is valid! Yea!\n")
693 i小于le32_to_cpu(num_partition_entries)且i小于limit减1循环
695  label_count等于0
697  start等于le64_to_cpu(starting_lba)
698  size等于le64_to_cpu(ending_lba)减le64_to_cpu(starting_lba)加1ULL
701  如果非s_pte_valid() - tests one PTE for validity*@pte:pte to check*@lastlba: last lba of the disk* Description: returns 1 if valid, 0 on error.则继续下一循环
704  put_partition(state, i + 1, start * ssz, size * ssz)
707  如果非efi_guidcmp(partition_type_guid, PARTITION_LINUX_RAID_GUID)则flags等于ADDPART_FLAG_RAID
710  info等于info
711  efi_guid_to_str( & unique_partition_guid, uuid)
714  label_max等于两数取小(ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(volname) - 1, ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(partition_name))
716  volname[label_max]等于0
718  c等于partition_name[label_count]按位与0xff
719  如果c且非isprint(c)则c等于'!'
721  volname[label_count]等于c
722  label_count自加
724  has_info = true
726  释放内存
727  释放内存
728  长字符串拼接
729  返回:1