Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ldm_parse_cmp3 - Read a raw VBLK Component object into a vblk structure*@buffer: Block of data being worked on*@buflen: Size of the block of data*@vb: In-memory vblk in which to return information

Proto:static bool ldm_parse_cmp3(const u8 *buffer, int buflen, struct vblk *vb)

Type:bool

Parameter:

TypeParameterName
const u8 *buffer
intbuflen
struct vblk *vb
725  BUG_ON(!buffer || !vb)
727  r_objid = ldm_relative - Calculate the next relative offset*@buffer: Block of data being worked on*@buflen: Size of the block of data*@base: Size of the previous fixed width fields*@offset: Cumulative size of the previous variable-width fields* Because many of the
728  r_name = ldm_relative - Calculate the next relative offset*@buffer: Block of data being worked on*@buflen: Size of the block of data*@base: Size of the previous fixed width fields*@offset: Cumulative size of the previous variable-width fields* Because many of the
729  r_vstate = ldm_relative - Calculate the next relative offset*@buffer: Block of data being worked on*@buflen: Size of the block of data*@base: Size of the previous fixed width fields*@offset: Cumulative size of the previous variable-width fields* Because many of the
730  r_child = ldm_relative - Calculate the next relative offset*@buffer: Block of data being worked on*@buflen: Size of the block of data*@base: Size of the previous fixed width fields*@offset: Cumulative size of the previous variable-width fields* Because many of the
731  r_parent = ldm_relative - Calculate the next relative offset*@buffer: Block of data being worked on*@buflen: Size of the block of data*@base: Size of the previous fixed width fields*@offset: Cumulative size of the previous variable-width fields* Because many of the
733  If buffer[0x12] & vblk flags indicating extra information will be present Then
734  r_stripe = ldm_relative - Calculate the next relative offset*@buffer: Block of data being worked on*@buflen: Size of the block of data*@base: Size of the previous fixed width fields*@offset: Cumulative size of the previous variable-width fields* Because many of the
735  r_cols = ldm_relative - Calculate the next relative offset*@buffer: Block of data being worked on*@buflen: Size of the block of data*@base: Size of the previous fixed width fields*@offset: Cumulative size of the previous variable-width fields* Because many of the
736  len = r_cols
737  Else
738  r_stripe = 0
739  r_cols = 0
740  len = r_parent
742  If len < 0 Then Return false
745  len += Name and version
746  If len != get_unaligned_be32(buffer + 0x14) Then Return false
749  comp = comp
750  ldm_get_vstr - Read a length-prefixed string into a buffer*@block: Pointer to the length marker*@buffer: Location to copy string to*@buflen: Size of the output buffer* Many of the strings in the LDM Database are not NULL terminated. Instead
752  type = buffer[0x18 + r_vstate]
753  children = ldm_get_vnum - Convert a variable-width, big endian number, into cpu order*@block: Pointer to the variable-width number to convert* Large numbers in the LDM Database are often stored in a packed format. Each* number is prefixed by a one byte width marker
754  parent_id = ldm_get_vnum - Convert a variable-width, big endian number, into cpu order*@block: Pointer to the variable-width number to convert* Large numbers in the LDM Database are often stored in a packed format. Each* number is prefixed by a one byte width marker
755  chunksize = If r_stripe Then ldm_get_vnum - Convert a variable-width, big endian number, into cpu order*@block: Pointer to the variable-width number to convert* Large numbers in the LDM Database are often stored in a packed format. Each* number is prefixed by a one byte width marker Else 0
757  Return true
Caller
NameDescribe
ldm_parse_vblkldm_parse_vblk - Read a raw VBLK object into a vblk structure*@buf: Block of data being worked on*@len: Size of the block of data*@vb: In-memory vblk in which to return information* Read a raw VBLK object into a vblk structure