Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:find_vol1_partitions

Proto:static int find_vol1_partitions(struct parsed_partitions *state, struct hd_geometry *geo, int blocksize, char name[], union label_t *label)

Type:int

Parameter:

TypeParameterName
struct parsed_partitions *state
struct hd_geometry *geo
intblocksize
charname
union label_t *label
148  snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
149  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.
154  secperblk = blocksize >> 9
155  blk = mpute the block number from a* cyl-cyl-head-head-block structure + 1
156  counter = 0
157  data = read_part_sector(state, blk * secperblk, & sect)
158  When (data != NULL) cycle
159  memcpy( & f1, data, sizeof(structvtoc_format1_label))
160  put_dev_sector(sect)
166  blk++
168  Continue
171  If format identifier != ASCII -> EBCDIC conversion table ['1'] && format identifier != ASCII -> EBCDIC conversion table ['8'] Then Break
175  offset = mpute the block number from a* cyl-cyl-head-head structure
176  size = mpute the block number from a* cyl-cyl-head-head structure - offset + sectors
178  offset *= secperblk
179  size *= secperblk
180  If counter >= limit Then Break
182  put_partition(state, counter + 1, offset, size)
183  counter++
184  blk++
185  data = read_part_sector(state, blk * secperblk, & sect)
187  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.
189  If Not data Then Return -1
192  Return 1
Caller
NameDescribe
ibm_partitionThis is the main function, called by check.c