函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ldm_parse_vol5 - Read a raw VBLK Volume 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

函数原型:static bool ldm_parse_vol5(const u8 *buffer, int buflen, struct vblk *vb)

返回类型:bool

参数:

类型参数名称
const u8 *buffer
intbuflen
struct vblk *vb
1010  BUG_ON(!buffer || !vb)
1011  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
1012  如果r_objid小于0则
1013  ldm_error("r_objid %d < 0", r_objid)
1014  返回:false
1016  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
1017  如果r_name小于0则
1018  ldm_error("r_name %d < 0", r_name)
1019  返回:false
1021  r_vtype等于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
1022  如果r_vtype小于0则
1023  ldm_error("r_vtype %d < 0", r_vtype)
1024  返回:false
1026  r_disable_drive_letter等于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
1027  如果r_disable_drive_letter小于0则
1028  ldm_error("r_disable_drive_letter %d < 0", r_disable_drive_letter)
1030  返回:false
1032  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
1033  如果r_child小于0则
1034  ldm_error("r_child %d < 0", r_child)
1035  返回:false
1037  r_size等于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
1038  如果r_size小于0则
1039  ldm_error("r_size %d < 0", r_size)
1040  返回:false
1042  如果buffer[0x12]按位与VBLK_FLAG_VOLU_ID1
1043  r_id1等于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
1044  如果r_id1小于0则
1045  ldm_error("r_id1 %d < 0", r_id1)
1046  返回:false
1048  否则r_id1等于r_size
1050  如果buffer[0x12]按位与VBLK_FLAG_VOLU_ID2
1051  r_id2等于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
1052  如果r_id2小于0则
1053  ldm_error("r_id2 %d < 0", r_id2)
1054  返回:false
1056  否则r_id2等于r_id1
1058  如果buffer[0x12]按位与VBLK_FLAG_VOLU_SIZE
1059  r_size2等于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
1060  如果r_size2小于0则
1061  ldm_error("r_size2 %d < 0", r_size2)
1062  返回:false
1064  否则r_size2等于r_id2
1066  如果buffer[0x12]按位与VBLK_FLAG_VOLU_DRIVE
1067  r_drive等于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
1068  如果r_drive小于0则
1069  ldm_error("r_drive %d < 0", r_drive)
1070  返回:false
1072  否则r_drive等于r_size2
1074  len等于r_drive
1075  如果len小于0则
1076  ldm_error("len %d < 0", len)
1077  返回:false
1079  len加等于VBLK_SIZE_VOL5
1080  如果len大于get_unaligned_be32(buffer + 0x14)则
1081  ldm_error("len %d > BE32(buffer + 0x14) %d", len, get_unaligned_be32(buffer + 0x14))
1083  返回:false
1085  volu等于volu
1086  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
1088  memcpy(volume_state, buffer + 0x18 + r_disable_drive_letter, volume_state的长度)
1090  size等于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
1091  partition_type等于buffer[0x41 + r_size]
1092  memcpy(guid, buffer + 0x42 + r_size, guid的长度)
1093  如果buffer[0x12]按位与VBLK_FLAG_VOLU_DRIVE
1094  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
1097  返回:true
调用者
名称描述
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