Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\partitions\karma.c Create Date:2022-07-28 17:32:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:karma_partition

Proto:int karma_partition(struct parsed_partitions *state)

Type:int

Parameter:

TypeParameterName
struct parsed_partitions *state
17  slot = 1
20  struct disklabel{u8 d_reserved[270];struct d_partition{__le32 p_res;u8 p_fstype;u8 p_res2[3];__le32 p_offset;__le32 p_size;}d_partitions[2];u8 d_blank[208];__le16 d_magic;}gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-packed-type-attribute* clang: https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#index-packed-variable-attribute * label
34  data = read_part_sector(state, 0, & sect)
35  If Not data Then Return -1
38  label = data
39  If le16_to_cpu(d_magic) != s/partitions/karma.h Then
40  put_dev_sector(sect)
41  Return 0
44  p = d_partitions
45  When i < 2 cycle
46  If slot == limit Then Break
49  If p_fstype == 0x4d && le32_to_cpu(p_size) Then
53  slot++
55  strlcat - Append a length-limited, C-string to another*@dest: The string to be appended to*@src: The string to append to it*@count: The size of the destination buffer.
56  put_dev_sector(sect)
57  Return 1