Function report |
Source Code:block\partitions\efi.c |
Create Date:2022-07-28 17:31:20 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:s_pmbr_valid(): test Protective MBR for validity*@mbr: pointer to a legacy mbr structure*@total_sectors: amount of sectors in the device* Description: Checks for a valid protective or hybrid* master boot record (MBR)
Proto:static int is_pmbr_valid(legacy_mbr *mbr, sector_t total_sectors)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
legacy_mbr * | mbr | |
sector_t | total_sectors |
176 | sz = 0 |
179 | If Not mbr || le16_to_cpu(signature) != MSDOS_MBR_SIGNATURE Then Go to done |
183 | ret = pmbr_part_valid( & partition_record[i]) |
184 | If ret == GPT_MBR_PROTECTIVE Then |
191 | Go to check_hybrid |
195 | If ret != GPT_MBR_PROTECTIVE Then Go to done |
197 | check_hybrid : |
198 | When i < 4 cycle If EFI and legacy non-EFI OS types != EFI_PMBR_OSTYPE_EFI_GPT && EFI and legacy non-EFI OS types != 0x00 Then |
202 | ret = GPT_MBR_HYBRID |
216 | If ret == GPT_MBR_PROTECTIVE Then |
217 | sz = le32_to_cpu( used by EFI - size of pt in LBA ) |
218 | If sz != total_sectors - 1 && sz != 0xFFFFFFFF Then pr_debug("GPT: mbr size in lba (%u) different than whole disk (%u).\n", sz, min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(uint32_t, total_sectors - 1, 0xFFFFFFFF)) |
223 | done : |
224 | Return ret |
Name | Describe |
---|---|
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. |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |