tb_nvm_alloc(9)
β¨ tb_nvm_alloc(9) β¨
okay so bestie, this one's a kernel API manual page β tb_nvm_alloc β and it's literally the function that makes you a fresh NVM struct. That's the whole vibe. π
πΈ NAME πΈ
tb_nvm_alloc β allocate a shiny new NVM structure, no cap
π SYNOPSIS π
struct tb_nvm * tb_nvm_alloc (struct device *dev );
π¦ ARGUMENTS π¦
devβ the device that owns the NVM, like it's the parent and the NVM is its baby π«Ά
π DESCRIPTION π
So what it does: it allocates a brand-new NVM structure, gives it a unique id (yes, every single one gets its own, iconic), and hands it right back to you. That's it. That's the function. β¨
π RETURN π
- Pointer to
struct tb_nvmβ on success, obviously, slay π -EOPNOTSUPPβ this is the "girl I don't know her" era: it comes back if the NVM format of thedevis not known by the kernel πERR_PTRβ in case of failure, fr fr
π SEE ALSO π
Kernel file ./drivers/thunderbolt/nvm.c, plus the whole friend group:
struct tb_nvm_vendor_ops(9)struct tb_nvm_vendor(9)tb_nvm_read_version(9)tb_nvm_validate(9)tb_nvm_write_headers(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)
quick reminder bestie: if you get -EOPNOTSUPP back, it's not you, it's the kernel not recognising that NVM format π don't take it personally.
okay that's the page!! this one lives in ./drivers/thunderbolt, October 2026 edition, so go off and allocate responsibly ππ
β xoxo, your local kernel bestie π§ββοΈβ
π¦ 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