Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:osf_partition

Proto:int osf_partition(struct parsed_partitions *state)

Type:int

Parameter:

TypeParameterName
struct parsed_partitions *state
19  slot = 1
23  struct disklabel{__le32 d_magic;__le16 d_type, d_subtype;u8 d_typename[16];u8 d_packname[16];__le32 d_secsize;__le32 d_nsectors;__le32 d_ntracks;__le32 d_ncylinders;__le32 d_secpercyl;__le32 d_secprtunit;__le16 d_sparespertrack;__le16 d_sparespercyl;__le32 d_acylinders;__le16 d_rpm, d_interleave, d_trackskew, d_cylskew;__le32 d_headswitch, d_trkseek, d_flags;__le32 d_drivedata[5];__le32 d_spare[5];__le32 d_magic2;__le16 d_checksum;__le16 d_npartitions;__le32 d_bbsize, d_sbsize;struct d_partition{__le32 p_size;__le32 p_offset;__le32 p_fsize;u8 p_fstype;u8 p_frag;__le16 p_cpg;}d_partitions[18];} * label
56  data = read_part_sector(state, 0, & sect)
57  If Not data Then Return -1
60  label = data + 64
61  partition = d_partitions
62  If le32_to_cpu(d_magic) != s/partitions/osf.h Then
63  put_dev_sector(sect)
64  Return 0
66  If le32_to_cpu(d_magic2) != s/partitions/osf.h Then
67  put_dev_sector(sect)
68  Return 0
70  npartitions = le16_to_cpu(d_npartitions)
71  If npartitions > MAX_OSF_PARTITIONS Then
72  put_dev_sector(sect)
73  Return 0
75  When i < npartitions cycle
76  If slot == limit Then Break
78  If le32_to_cpu(p_size) Then put_partition(state, slot, le32_to_cpu(p_offset), le32_to_cpu(p_size))
82  slot++
84  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.
85  put_dev_sector(sect)
86  Return 1