tb_switch_find_cap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tb_switch_find_cap(9) β€” Kernel API Manual, bestie edition πŸ¦‹

okay so this is a page from the Kernel API Manual, and it's literally all about tb_switch_find_cap β€” a Thunderbolt girlie's best friend. No cap, she's here to hunt down a capability for you. Let's get into it ✨


🌸 NAME 🌸

tb_switch_find_cap β€” Find switch capability

like, she finds the capability. that's the whole vibe. main character energy fr fr πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

int tb_switch_find_cap (struct tb_switch *sw , enum tb_switch_cap cap );

yes bestie, that's the exact signature β€” copy it character for character, don't be out here improvising πŸ™ˆ


✨ ARGUMENTS ✨

  • sw β€” the switch you wanna find the capability for 🫢 like, this is the girl you're investigating
  • cap β€” the capability you're looking for πŸ‘€ the thing you're tryna locate, iykyk

πŸ’– RETURN πŸ’–

the way this function gives you options... let's break it down:

  • Offset to the start of capability β€” on success πŸ’… slay, you found it, it's giving victory
  • -ENOENT β€” if no such capability was found 😭 like she looked and it's just not there, tragic
  • Negative errno β€” another error occurred πŸ’€ so something else went wrong, not the not-found kind, a whole different situation
no cap, check your return values bestie β€” -ENOENT is not the same as "some other negative errno," and mixing them up is highkey a mess 🌈

🧚 SEE ALSO 🧚

all the sister functions, we stan a connected ecosystem πŸ”₯


and that's the whole page, bestie β€” go find those capabilities πŸ’œ

sign-off time πŸŽ€ this one's from the ./drivers/thunderbolt source, dated October 2026, and yeah β€” the page name is tb_switch_find_cap(9) in case you forgot already lol πŸ¦‹ ✨

πŸ“¦ where this page comes from