| Function report | 
| Source Code: block\partitions\aix.c | Create Date:2022-07-28 17:26:31 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:aix_partition
Proto:int aix_partition(struct parsed_partitions *state)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct parsed_partitions * | state | 
| 173 | ret = 0 | 
| 177 | pp_blocks_size = 0 | 
| 178 | vgda_sector = 0 | 
| 179 | vgda_len = 0 | 
| 180 | numlvs = 0 | 
| 182 | struct lv_info{unsigned short pps_per_lv;unsigned short pps_found;unsigned char lv_is_contiguous;} * lvip | 
| 189 | d = read_part_sector(state, 7, & sect) | 
| 190 | If d Then | 
| 192 | lvm_version = be16_to_cpu(version) | 
| 195 | If lvm_version == 1 Then | 
| 196 | pp_size_log2 = be16_to_cpu( log2(pp_size) ) | 
| 198 | pp_bytes_size = 1 << pp_size_log2 | 
| 199 | pp_blocks_size = pp_bytes_size / 512 | 
| 203 | vgda_len = be32_to_cpu(vgda_len) | 
| 204 | vgda_sector = be32_to_cpu(vgda_psn[0]) | 
| 205 | Else | 
| 211 | put_dev_sector(sect) | 
| 213 | If vgda_sector && (d = read_part_sector(state, vgda_sector, & sect)) Then | 
| 219 | lvip = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc). | 
| 220 | If Not lvip Then Return 0 | 
| 222 | If numlvs && (d = read_part_sector(state, vgda_sector + 1, & sect)) Then | 
| 227 | If n Then | 
| 228 | foundlvs = 0 | 
| 231 | pps_per_lv = be16_to_cpu(num_lps) | 
| 232 | If pps_per_lv Then foundlvs += 1 | 
| 238 | put_dev_sector(sect) | 
| 240 | If pvd Then | 
| 241 | numpps = be16_to_cpu(pp_count) | 
| 242 | psn_part1 = be32_to_cpu(psn_part1) | 
| 244 | cur_lv_ix = -1 | 
| 245 | next_lp_ix = 1 | 
| 252 | lp_ix = be16_to_cpu(lp_ix) | 
| 253 | If Not lp_ix Then | 
| 254 | next_lp_ix = 1 | 
| 255 | Continue | 
| 257 | lv_ix = be16_to_cpu(lv_ix) - 1 | 
| 259 | cur_lv_ix = -1 | 
| 260 | Continue | 
| 262 | pps_found += 1 | 
| 263 | If lp_ix == 1 Then | 
| 265 | next_lp_ix = 1 | 
| 266 | Else if lv_ix != cur_lv_ix || lp_ix != next_lp_ix Then | 
| 267 | next_lp_ix = 1 | 
| 268 | Continue | 
| 270 | If lp_ix == pps_per_lv Then | 
| 273 | put_partition(state, lv_ix + 1, (i + 1 - lp_ix) * pp_blocks_size + psn_part1, pps_per_lv * pp_blocks_size) | 
| 279 | lv_is_contiguous = 1 | 
| 280 | ret = 1 | 
| 281 | next_lp_ix = 1 | 
| 282 | Else next_lp_ix += 1 | 
| 285 | When i < limit cycle If pps_found && Not lv_is_contiguous Then | 
| 298 | Return ret | 
| Name | Describe | 
|---|---|
| msdos_partition | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |