Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\partitions\efi.c Create Date:2022-07-28 17:31:56
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:_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,

Proto:int efi_partition(struct parsed_partitions *state)

Type:int

Parameter:

TypeParameterName
struct parsed_partitions *state
680  gpt_header * gpt = NULL
681  gpt_entry * ptes = NULL
683  ssz = bdev_logical_block_size(bdev) / 512
685  If Not 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. || Not gpt || Not ptes Then
686  kfree(gpt)
687  kfree(ptes)
688  Return 0
691  pr_debug("GUID Partition Table is valid! Yea!\n")
693  When i < le32_to_cpu(num_partition_entries) && i < limit - 1 cycle
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  If Not 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. Then Continue
704  put_partition(state, i + 1, start * ssz, size * ssz)
707  If Not efi_guidcmp(partition_type_guid, PARTITION_LINUX_RAID_GUID) Then flags = ADDPART_FLAG_RAID
710  info = info
711  efi_guid_to_str( & unique_partition_guid, uuid)
714  label_max = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(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
717  When label_count < label_max cycle
718  c = partition_name[label_count] & 0xff
719  If c && Not isprint(c) Then c = '!'
721  volname[label_count] = c
722  label_count++
724  has_info = true
726  kfree(ptes)
727  kfree(gpt)
728  strlcat - Append a length-limited, C-string to another*@dest: The string to be appended to*@src: The string to append to it*@count: The size of the destination buffer.
729  Return 1