函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ldm_parse_tocblock - Read the LDM Database TOCBLOCK structure*@data: Raw database TOCBLOCK structure loaded from the device*@toc: In-memory toc structure in which to return parsed information* This parses the LDM Database TOCBLOCK (table of contents)

函数原型:static bool ldm_parse_tocblock(const u8 *data, struct tocblock *toc)

返回类型:bool

参数:

类型参数名称
const u8 *data
struct tocblock *toc
128  BUG_ON(!data || !toc)
130  如果TOCBLOCK 不等于get_unaligned_be64(data)则
131  ldm_crit("Cannot find TOCBLOCK, database may be corrupt.")
132  返回:false
134  strncpy( We have exactly two bitmaps. , data + 0x24, We have exactly two bitmaps. 的长度)
135  We have exactly two bitmaps. [ We have exactly two bitmaps. 的长度 - 1]等于0
136  bitmap1_start等于get_unaligned_be64(data + 0x2E)
137  bitmap1_size等于get_unaligned_be64(data + 0x36)
139  如果字符串指定长度比较不等于0则
141  ldm_crit("TOCBLOCK's first bitmap is '%s', should be '%s'.", Names of the two defined , We have exactly two bitmaps. )
143  返回:false
145  strncpy(bitmap2_name, data + 0x46, bitmap2_name的长度)
146  bitmap2_name[bitmap2_name的长度 - 1]等于0
147  bitmap2_start等于get_unaligned_be64(data + 0x50)
148  bitmap2_size等于get_unaligned_be64(data + 0x58)
149  如果字符串指定长度比较不等于0则
151  ldm_crit("TOCBLOCK's second bitmap is '%s', should be '%s'.", maps in the TOCBLOCK. , bitmap2_name)
153  返回:false
155  ldm_debug/info/error/crit - Output an error message*@f: A printf format string containing the message*@...: Variables to substitute into @f* ldm_debug() writes a DEBUG level message to the syslog but only if the* driver was compiled with debug enabled("Parsed TOCBLOCK successfully.")
156  返回:true
调用者
名称描述
ldm_validate_tocblocksldm_validate_tocblocks - Validate the table of contents and its backups*@state: Partition check state including device holding the LDM Database*@base: Offset, into @state->bdev, of the database*@ldb: Cache of the database structures* Find and compare the