函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:amiga_partition

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

返回类型:int

参数:

类型参数名称
struct parsed_partitions *state
35  res等于0
36  blksize等于1
37  slot等于1
40  循环
41  如果blk恒等于RDB_ALLOCATION_LIMIT则转到:rdb_done
43  data等于read_part_sector(state, blk, & sect)
44  如果非data
45  如果This is ugly: should make genhd removable media aware打印错误信息("Dev %s: unable to read RDB block %d\n", bdevname(bdev, b), blk)
48  res等于负1
49  转到:rdb_done
51  如果data不等于cpu_to_be32("RDSK" )则继续下一循环
54  rdb等于data
55  如果checksum_block((__be32 * )data, be32_to_cpu(rdb_SummedLongs) & 0x7F)恒等于0则退出
60  *data加0xdc的和等于0
61  如果checksum_block((__be32 * )data, be32_to_cpu(rdb_SummedLongs) & 0x7F)恒等于0则
63  打印错误信息("Trashed word at 0xd0 in block %d ignored in checksum calculation\n", blk)
65  退出
68  打印错误信息("Dev %s: RDB in block %d has bad checksum\n", bdevname(bdev, b), blk)
73  blksize等于be32_to_cpu(rdb_BlockBytes)除512
79  snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
80  长字符串拼接
82  blk等于be32_to_cpu(rdb_PartitionList)
83  put_dev_sector(sect)
84 blk大于0且part小于等于16循环
85  blk乘等于blksize
86  data等于read_part_sector(state, blk, & sect)
87  如果非data
88  如果This is ugly: should make genhd removable media aware打印错误信息("Dev %s: unable to read partition block %d\n", bdevname(bdev, b), blk)
91  res等于负1
92  转到:rdb_done
94  pb等于data
95  blk等于be32_to_cpu(pb_Next)
96  如果pb_ID不等于cpu_to_be32("PART" )则继续下一循环
98  如果checksum_block((__be32 * )pb, be32_to_cpu(pb_SummedLongs) & 0x7F)不等于0则继续下一循环
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  如果非nr_sects则继续下一循环
110  start_sect等于be32_to_cpu(pb_Environment[9])乘be32_to_cpu(pb_Environment[3])乘be32_to_cpu(pb_Environment[5])乘blksize
120  dt等于dostype
121  dt等于pb_Environment[16]
136  res等于1
138  长字符串拼接
140  rdb_done :
141  返回:res