tb_nvm_write_headers(9)
π tb_nvm_write_headers β the "headers first bestie" era β¨
okay so this is a page from the Kernel API Manual (yes, tb_nvm_write_headers(9), we're being fancy today) and it's genuinely so simple it's iconic π
πΈ NAME πΈ
tb_nvm_write_headers β write the headers before the rest of the image, no cap π
β¨ SYNOPSIS β¨
int tb_nvm_write_headers (struct tb_nvm *nvm );
like, that's it. one function, one argument, main character energy π
π¦ ARGUMENTS π¦
nvmβ the NVM structure. that's the whole description. it's giving minimalist π«Ά
π DESCRIPTION π
okay so here's the vibe: some vendor NVM formats are extra and require that you write the headers before the rest of the image. if that's your device, this function does exactly that. periodt β¨
and the best part? you can call it even if the device does not need this. so it's not gonna be weird about it β call it anyway, it's fine, it slays either way π
π₯ RETURN π₯
0on success π- a negative errno otherwise π (iykyk, check your errnos)
π SEE ALSO π
- the kernel file
./drivers/thunderbolt/nvm.cβ go read it, it's right there π struct tb_nvm_vendor_ops(9)struct tb_nvm_vendor(9)tb_nvm_alloc(9)tb_nvm_read_version(9)tb_nvm_validate(9)tb_nvm_add_active(9)tb_nvm_write_buf(9)tb_nvm_add_non_active(9)tb_nvm_free(9)tb_nvm_read_data(9)tb_nvm_write_data(9)
like the whole friend group fr fr π«Ά
ngl this one's short but it's still important β go write those headers first, bestie π§
okay that's the page!! brought to you by the good people over in ./drivers/thunderbolt, dated October 2026 β mwah, drink water, and don't forget your errno checks πβπ
π¦ 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