tb_lc_is_usb_plugged(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ tb_lc_is_usb_plugged πŸ’…

okay so this is a kernel API manual page, bestie β€” the function is literally called tb_lc_is_usb_plugged and it lives in section 9 of the manual (that's the kernel API section, iykyk). It's giving "quick little yes-or-no question" energy, and honestly? we love a function that just tells you the truth. 🫢


🌸 NAME 🌸

tb_lc_is_usb_plugged β€” is there a USB device connected to this port or not? That's it. That's the whole gig. πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

bool tb_lc_is_usb_plugged (struct tb_port *port );

it returns a bool, it takes one argument, it does not have time for drama. slay. ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • port β€” the device router lane 0 adapter. that's the thing you're asking about. like pointing at a door and being like "is somebody in there?" πŸšͺπŸ‘€

⭐ RETURN ⭐

  • true β€” yesss, the port has a USB Type-C device connected to it. plugged in. connected. living its best life. πŸ”ŒπŸ’–
  • false β€” nope, nothing hooked up to that port. empty. quiet. no device, no vibes. 😭

🌈 SEE ALSO 🌈

okay so there is a LOT of sibling energy in this family, and the kernel file is literally ./drivers/thunderbolt/lc.c β€” here's everyone in the group chat:

like, that's the whole friend group. go say hi. πŸ§šβ€β™€οΈ


ngl if you were looking for a long, complicated function β€” this is not her. she's one question, one answer, done. and that's iconic. πŸ‘‘

mwah πŸ’‹ β€” this page is brought to you by the source tree ./drivers/thunderbolt, dated October 2026, and it's been tb_lc_is_usb_plugged(9) the entire time. periodt. πŸ’œ

πŸ“¦ where this page comes from