tb_nvm_write_data(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tb_nvm_write_data(9) β€” from the Kernel API Manual, bestie

okay so this is tb_nvm_write_data, and it lives in the Kernel API Manual section 9 (that's the kernel-functions girly). Let me tell you everything about it, no cap. 🫢


✨ NAME ✨

tb_nvm_write_data β€” literally just "Write data to NVM". That's the whole vibe. πŸ’–


🌸 SYNOPSIS 🌸

int tb_nvm_write_data (unsigned int address , const void *buf , size_t
size , unsigned int retries , write_block_fn write_block , void
*write_block_data );

like, six arguments. she's high maintenance but she's worth it. πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • address β€” the start address on the flash. where the magic happens, basically. πŸ“
  • buf β€” the buffer where the data is copied from. it's the source, the main character. 🌟
  • size β€” size of the buffer, in bytes. don't fumble this one bestie. πŸ“
  • retries β€” number of retries if the block write fails. yes, she tries again. persistence ate. πŸ”
  • write_block β€” the function that writes block to the flash. a whole callback, iconic. ⚑
  • write_block_data β€” data passed to write_block. it's giving "plus one". πŸ’Œ

πŸ¦‹ DESCRIPTION πŸ¦‹

So this is a generic function that writes data to NVM, or to an NVM-like device. that's it, that's the whole description β€” she's a generalist, she's versatile, she contains multitudes. ✨ lowkey obsessed with how straightforward that is.


🌈 RETURN 🌈

  • 0 on success πŸŽ‰
  • negative errno otherwise 😭
fr fr, check that return value. negative errno is NOT a vibe and she will not warn you twice. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/thunderbolt/nvm.c and honestly the whole friend group:

go read all of them, iykyk. πŸ“šπŸ’…


aaaand that's the page!! πŸ“ sign-off time: this one's straight out of ./drivers/thunderbolt, dated October 2026 β€” so she's lowkey from the future, slay. mwah, go write some NVM data responsibly πŸ§šπŸ’œ

πŸ“¦ where this page comes from