Function report |
Source Code:block\partitions\ldm.c |
Create Date:2022-07-28 17:27:20 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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)
Proto:static bool ldm_parse_tocblock(const u8 *data, struct tocblock *toc)
Type:bool
Parameter:
Type | Parameter | Name |
---|---|---|
const u8 * | data | |
struct tocblock * | toc |
130 | If TOCBLOCK != get_unaligned_be64(data) Then |
131 | ldm_crit("Cannot find TOCBLOCK, database may be corrupt.") |
132 | Return false |
134 | strncpy( We have exactly two bitmaps. , data + 0x24, size of We have exactly two bitmaps. ) |
135 | We have exactly two bitmaps. [ size of We have exactly two bitmaps. - 1] = 0 |
136 | bitmap1_start = get_unaligned_be64(data + 0x2E) |
137 | bitmap1_size = get_unaligned_be64(data + 0x36) |
139 | If strncmp( We have exactly two bitmaps. , Names of the two defined , size of We have exactly two bitmaps. ) != 0 Then |
141 | ldm_crit("TOCBLOCK's first bitmap is '%s', should be '%s'.", Names of the two defined , We have exactly two bitmaps. ) |
143 | Return false |
145 | strncpy(bitmap2_name, data + 0x46, size of bitmap2_name ) |
146 | bitmap2_name[ size of bitmap2_name - 1] = 0 |
147 | bitmap2_start = get_unaligned_be64(data + 0x50) |
148 | bitmap2_size = get_unaligned_be64(data + 0x58) |
149 | If strncmp(bitmap2_name, maps in the TOCBLOCK. , size of bitmap2_name ) != 0 Then |
151 | ldm_crit("TOCBLOCK's second bitmap is '%s', should be '%s'.", maps in the TOCBLOCK. , bitmap2_name) |
153 | Return false |
156 | Return true |
Name | Describe |
---|---|
ldm_validate_tocblocks | ldm_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 |
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 |