tb_drom_read(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay so first of all, hi, welcome to the function page for tb_drom_read. This is a kernel API manual entry, and honestly it's giving "small function, big responsibility" energy, so let's get into it 🫢


✨ NAME ✨

tb_drom_read β€” Copy DROM to sw->drom and parse it 🌸

✨ SYNOPSIS ✨

int tb_drom_read (struct tb_switch *sw );

✨ ARGUMENTS ✨

  • sw β€” the router whose DROM we're gonna read and parse, like that's literally the whole vibe of this parameter πŸ’…

✨ DESCRIPTION ✨

So here's the tea β˜•: this function reads the router DROM, and if that goes well (no cap, "if successful" is doing a lot of heavy lifting there), it parses the entries and populates the fields in sw accordingly. Basically it fills in the blanks on your switch struct, iconic behaviour honestly ✨

And the best part? It can be called for any router generation πŸ‘‘ Like, no generational gatekeeping here, every router era is welcome at this function's table πŸ’–

✨ RETURN ✨

  • 0 on success πŸŽ‰ slay
  • a negative errno otherwise 😭 not slay, but at least it tells you what went wrong

✨ SEE ALSO ✨


ngl, if you're poking at DROM parsing at all, you're lowkey doing main character kernel work. obsess. πŸ’€βœ¨

okay that's the whole page, bestie β€” ta-ta for now! 🌈 This one's sourced from ./drivers/thunderbolt and dated October 2026, so mark your calendars and stay hydrated πŸ’–πŸŽ€πŸ§š

πŸ“¦ where this page comes from