函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\partitions\osf.c Create Date:2022-07-27 19:05:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:osf_partition

函数原型:int osf_partition(struct parsed_partitions *state)

返回类型:int

参数:

类型参数名称
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  如果非data则返回:负1
60  label等于data加64
61  partition等于d_partitions
62  如果le32_to_cpu(d_magic)不等于s/partitions/osf.h
63  put_dev_sector(sect)
64  返回:0
66  如果le32_to_cpu(d_magic2)不等于s/partitions/osf.h
67  put_dev_sector(sect)
68  返回:0
70  npartitions等于le16_to_cpu(d_npartitions)
71  如果npartitions大于MAX_OSF_PARTITIONS
72  put_dev_sector(sect)
73  返回:0
75 i小于npartitions循环
76  如果slot恒等于limit退出
78  如果le32_to_cpu(p_size)则put_partition(state, slot, le32_to_cpu(p_offset), le32_to_cpu(p_size))
82  slot自加
84  长字符串拼接
85  put_dev_sector(sect)
86  返回:1