Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:msdos_partition

Proto:int msdos_partition(struct parsed_partitions *state)

Type:int

Parameter:

TypeParameterName
struct parsed_partitions *state
454  sector_size = bdev_logical_block_size(bdev) / 512
462  data = read_part_sector(state, 0, & sect)
463  If Not data Then Return -1
470  If aix_magic_present(state, data) Then
471  put_dev_sector(sect)
473  Return aix_partition(state)
480  If Not msdos_magic_present(data + 510) Then
481  put_dev_sector(sect)
482  Return 0
491  p = data + 0x1be
492  When slot <= 4 cycle
493  If 0x80 - active != 0 && 0x80 - active != 0x80 Then
499  fb = data
505  Else
507  Return 0
513  p = data + 0x1be
514  When slot <= 4 cycle
516  If SYS_IND(p) == EFI_PMBR_OSTYPE_EFI_GPT Then
518  Return 0
522  p = data + 0x1be
524  disksig = le32_to_cpup((__le32 * )(data + 0x1b8))
532  next = 5
533  When slot <= 4 cycle
534  start = start_sect(p) * sector_size
535  size = nr_sects(p) * sector_size
537  If Not size Then Continue
539  If is_extended_partition(p) Then
546  n = 2
554  Continue
556  put_partition(state, slot, start, size)
557  set_info(state, slot, disksig)
558  If SYS_IND(p) == LINUX_RAID_PARTITION Then flags = ADDPART_FLAG_RAID
560  If SYS_IND(p) == DM6_PARTITION Then 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.
562  If SYS_IND(p) == EZD_PARTITION Then 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.
566  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.
569  p = 0x1be + data
570  When slot <= 4 cycle
571  id = SYS_IND(p)
574  If Not nr_sects(p) Then Continue
577  When parse && id != id cycle If Not parse Then
581  Continue
582  parse(state, start_sect(p) * sector_size, nr_sects(p) * sector_size, slot)
585  put_dev_sector(sect)
586  Return 1