pldm_parse_one_record(9)
πΈ pldm_parse_one_record β a Kernel API Manual moment (yes, section 9 bestie) πΈ
okay so this is a page from the Kernel API Manual, and it's literally all about one tiny little function called pldm_parse_one_record. it does one job and it does it iconically: it vibe-checks a single PLDM record. π
β¨ NAME β¨
pldm_parse_one_record β verify the size of one PLDM record. that's it. that's the whole job. she's a size-checker and she's booked and busy π
π¦ SYNOPSIS π¦
int pldm_parse_one_record (struct pldmfw_priv *data , const struct
__pldmfw_record_info *__record );
like, exactly that. no cap. copy it character for character or don't come to the group chat π«Ά
π ARGUMENTS π
dataβ pointer to the image details. the whole picture. the main character's lore, if you will π__recordβ pointer to the record you actually want to check. the one getting the vibe check π
π DESCRIPTION π
okay so picture this: this function checks that the record size does not exceed either of these two things:
- the size of the firmware file π
- the total length specified in the header section π
both. either. she's checking against both and she is not being chill about it.
and THEN β because she's thorough, because she ate and left no crumbs β she also verifies that the recorded length of the start of the record matches the size you get by adding up all of these together:
- the static structure length
- the component bitmap length
- the version string length
- the length of all descriptor TLVs
- the length of the package data
add 'em up, compare, slay. if the recorded length and the calculated length agree, we're so back. if not, she notices. π
π₯ RETURN π₯
- zero on success β iconic, flawless, we love to see it β¨
- a negative error code on failure β it's giving "something's off bestie" π
π SEE ALSO π
so many siblings, honestly a whole family reunion π§. the kernel file lives at ./lib/pldmfw/pldmfw.c, and these are all the functions you might wanna go visit next:
pldm_check_fw_space(9)pldm_move_fw_offset(9)pldm_parse_header(9)pldm_check_desc_tlv_len(9)pldm_parse_desc_tlvs(9)pldm_parse_records(9)pldm_parse_components(9)pldm_verify_header_crc(9)pldmfw_free_priv(9)pldm_parse_image(9)pldmfw_op_pci_match_record(9)pldm_find_matching_record(9)pldm_send_package_data(9)pldm_send_component_tables(9)pldm_flash_components(9)pldm_finalize_update(9)pldmfw_flash_image(9)
π real talk: every single number, pointer and length here matters. this is one of those functions where "close enough" is not the vibe. if the lengths don't match exactly, she returns a negative error code and you will be hearing about it.
anyway that's the page!! mwah π this one's filed under ./lib/pldmfw, dated October 2026, and it's pldm_parse_one_record(9) forever and always πβ¨π¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms