函数逻辑报告 |
Source Code:block\partitions\sun.c |
Create Date:2022-07-27 19:05:25 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:sun_partition
函数原型:int sun_partition(struct parsed_partitions *state)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct parsed_partitions * | state |
18 | slot等于1 |
21 | struct sun_disklabel{unsigned char info[128];struct sun_vtoc{__be32 version;char volume[8];__be16 nparts;struct sun_info{__be16 id;__be16 flags;}infos[8];__be16 padding;__be32 bootinfo[3];__be32 sanity;__be32 reserved[10];__be32 timestamp[8];}vtoc;__be32 write_reinstruct;__be32 read_reinstruct;unsigned char spare[148];__be16 rspeed;__be16 pcylcount;__be16 sparecyl;__be16 obs1;__be16 obs2;__be16 ilfact;__be16 ncyl;__be16 nacyl;__be16 ntrks;__be16 nsect;__be16 obs3;__be16 obs4;struct sun_partition{__be32 start_cylinder;__be32 num_sectors;}partitions[8];__be16 magic;__be16 csum;} * label |
65 | label等于read_part_sector(state, 0, & sect) |
66 | 如果非label则返回:负1 |
69 | p等于partitions |
70 | 如果be16_to_cpu(magic)不等于s/partitions/sun.h则 |
73 | put_dev_sector(sect) |
74 | 返回:0 |
80 | 如果csum则 |
83 | put_dev_sector(sect) |
84 | 返回:0 |
88 | use_vtoc等于be32_to_cpu(sanity)恒等于SUN_VTOC_SANITY且be32_to_cpu(version)恒等于1且be16_to_cpu(nparts)小于等于8 |
93 | nparts等于如果use_vtoc则be16_to_cpu(nparts)否则8 |
101 | spc等于be16_to_cpu(ntrks)乘be16_to_cpu(nsect) |
108 | 如果num_sectors则 |
109 | put_partition(state, slot, st_sector, num_sectors) |
110 | flags等于0 |
111 | 如果use_vtoc则 |
112 | 如果be16_to_cpu(id)恒等于LINUX_RAID_PARTITION则flags或等于ADDPART_FLAG_RAID |
114 | 否则如果be16_to_cpu(id)恒等于SUN_WHOLE_DISK则flags或等于ADDPART_FLAG_WHOLEDISK |
118 | slot自加 |
120 | 长字符串拼接 |
121 | put_dev_sector(sect) |
122 | 返回:1 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |