tb_nvm_write_buf(9)
π tb_nvm_write_buf(9) β like, the Kernel API Manual era π
okay so bestie, welcome to tb_nvm_write_buf from the Kernel API Manual β this is the little helper that tucks your data into the @nvm buffer before anybody actually touches the flash β¨
πΈ NAME πΈ
tb_nvm_write_buf β write data to the @nvm buffer, no cap π
π¦ SYNOPSIS π¦
int tb_nvm_write_buf (struct tb_nvm *nvm , unsigned int offset , void
*val , size_t bytes );
β¨ ARGUMENTS β¨
nvmβ the NVM structure itself, our main character πoffsetβ where the writing starts, like the exact spot in the group chat πvalβ the data buffer you're writing, the content bestie π«Άbytesβ how many bytes we're writing, the literal headcount π’
π DESCRIPTION π
so this is a helper function whose whole vibe is caching the new NVM image before it actually gets written to the flash β lowkey the pre-game before the real event π
it copies bytes from val to nvm->buf, starting from offset. that's it, that's the function, and it ate π
π₯ RETURN π₯
0β on success, we love a happy ending π-ENOMEMβ if buffer allocation failed, absolutely devastating π- Negative errno β another error occurred, so like, something else went sideways fr fr π
π SEE ALSO π
Kernel file ./drivers/thunderbolt/nvm.c β plus the whole squad, iykyk:
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_write_headers(9)tb_nvm_add_active(9)tb_nvm_add_non_active(9)tb_nvm_free(9)tb_nvm_read_data(9)tb_nvm_write_data(9)
ngl bestie, go read those too, they're all part of the same iconic little thunderbolt nvm family tree π³
okay so that's the whole page!! sourced straight from ./drivers/thunderbolt, dated October 2026, and we are obsessed with the consistency π«Άπ periodt β¨π§ββοΈ
π¦ 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