tb_switch_find_port(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tb_switch_find_port β€” the Kernel API Manual tea β˜•

okay so bestie, welcome to tb_switch_find_port(9), straight out of the Kernel API Manual ✨ this one's a lil function-hunting page and it's honestly so chill. No cap.


🌸 NAME 🌸

tb_switch_find_port β€” literally returns the first port of @type on @sw, or NULL if there isn't one 🫢


πŸŽ€ SYNOPSIS πŸŽ€

struct tb_port * tb_switch_find_port (struct tb_switch *sw , enum
       tb_port_type type );

like… that's the whole vibe. one function, two args, zero drama πŸ’…


✨ ARGUMENTS ✨

  • sw β€” the switch you're digging through to find the port πŸ” this is your starting point, your main character switch
  • type β€” the port type you're looking for πŸ‘€ you tell it what kind of port you want and it goes looking

πŸ’– RETURN πŸ’–

A pointer to struct tb_port πŸ’« …or NULL if it's not found 😭 that's it, that's the whole return. no hidden surprises, no secret second return value, we love a straightforward icon πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹

okay so this is the part where the manpage just. goes off. it's giving "linked list of every thunderbolt function ever" and honestly? iconic 🌈 all of these live in the kernel file ./drivers/thunderbolt/switch.c:

fr fr that's the whole crew 🧚 go read them if you're obsessed with thunderbolt the way I am πŸ’œ


πŸ’€ quick vibe check: no bugs, no warnings, no exit statuses on this page. it's just a finder function doing finder function things. periodt.

so yeah bestie, that's tb_switch_find_port(9) β€” she's from ./drivers/thunderbolt, dated October 2026, and she ate πŸ’…βœ¨

πŸ“¦ where this page comes from