Function report | 
Source Code:block\partitions\amiga.c | 
Create Date:2022-07-28 17:25:54 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:amiga_partition
Proto:int amiga_partition(struct parsed_partitions *state)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct parsed_partitions * | state | 
| 35 | res = 0 | 
| 36 | blksize = 1 | 
| 37 | slot = 1 | 
| 40 | cycle | 
| 41 | If blk == RDB_ALLOCATION_LIMIT Then Go to rdb_done | 
| 43 | data = read_part_sector(state, blk, & sect) | 
| 44 | If Not data Then | 
| 45 | If This is ugly: should make genhd removable media aware Then pr_err("Dev %s: unable to read RDB block %d\n", bdevname(bdev, b), blk) | 
| 48 | res = -1 | 
| 49 | Go to rdb_done | 
| 51 | If data != cpu_to_be32("RDSK" ) Then Continue | 
| 55 | If checksum_block((__be32 * )data, be32_to_cpu(rdb_SummedLongs) & 0x7F) == 0 Then Break | 
| 60 | *(data + 0xdc) = 0 | 
| 61 | If checksum_block((__be32 * )data, be32_to_cpu(rdb_SummedLongs) & 0x7F) == 0 Then | 
| 73 | blksize = be32_to_cpu(rdb_BlockBytes) / 512 | 
| 82 | blk = be32_to_cpu(rdb_PartitionList) | 
| 83 | put_dev_sector(sect) | 
| 86 | data = read_part_sector(state, blk, & sect) | 
| 87 | If Not data Then | 
| 88 | If This is ugly: should make genhd removable media aware Then pr_err("Dev %s: unable to read partition block %d\n", bdevname(bdev, b), blk) | 
| 91 | res = -1 | 
| 92 | Go to rdb_done | 
| 95 | blk = be32_to_cpu(pb_Next) | 
| 96 | If pb_ID != cpu_to_be32("PART" ) Then Continue | 
| 98 | If checksum_block((__be32 * )pb, be32_to_cpu(pb_SummedLongs) & 0x7F) != 0 Then Continue | 
| 103 | nr_sects = ( be32_to_cpu(pb_Environment[10]) + 1 - be32_to_cpu(pb_Environment[9])) * be32_to_cpu(pb_Environment[3]) * be32_to_cpu(pb_Environment[5]) * blksize | 
| 108 | If Not nr_sects Then Continue | 
| 110 | start_sect = be32_to_cpu(pb_Environment[9]) * be32_to_cpu(pb_Environment[3]) * be32_to_cpu(pb_Environment[5]) * blksize | 
| 114 | put_partition(state, slot++, start_sect, nr_sects) | 
| 121 | dt = pb_Environment[16] | 
| 136 | res = 1 | 
| 140 | rdb_done : | 
| 141 | Return res | 
| 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  |