Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Create devices for each logical partition in an extended partition.* The logical partitions form a linked list, with each entry being* a partition table with two entries. The first entry* is the real data partition (with a start relative to the partition

Proto:static void parse_extended(struct parsed_partitions *state, sector_t first_sector, sector_t first_size, unsigned int disksig)

Type:void

Parameter:

TypeParameterName
struct parsed_partitions *state
sector_tfirst_sector
sector_tfirst_size
unsigned intdisksig
129  sector_size = bdev_logical_block_size(bdev) / 512
131  loopct = 0
134  this_sector = first_sector
135  this_size = first_size
137  When 1 cycle
138  If ++loopct > 100 Then Return
140  If next == limit Then Return
142  data = read_part_sector(state, this_sector, & sect)
143  If Not data Then Return
146  If Not msdos_magic_present(data + 510) Then Go to done
149  p = data + 0x1be
163  When i < 4 cycle
166  If Not nr_sects(p) || is_extended_partition(p) Then Continue
172  size = nr_sects(p) * sector_size
173  next = this_sector + offs
174  If i >= 2 Then
175  If offs + size > this_size Then Continue
177  If next < first_sector Then Continue
179  If next + size > first_sector + first_size Then Continue
187  loopct = 0
188  If ++next == limit Then Go to done
198  p -= 4
199  When i < 4 cycle If nr_sects(p) && is_extended_partition(p) Then
201  Break
202  If i == 4 Then Go to done
205  this_sector = first_sector + start_sect(p) * sector_size
206  this_size = nr_sects(p) * sector_size
207  put_dev_sector(sect)
209  done :
210  put_dev_sector(sect)
Caller
NameDescribe
msdos_partition