show_protocols(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– show_protocols(9) β€” like, the Kernel API Manual page, bestie πŸ’–

okay so this is a page from the Kernel API Manual (yes, the show_protocols(9) one, that's the name of the whole vibe), and honestly? it's a little baddie. let's get into it ✨


🌸 NAME 🌸

show_protocols β€” shows the current IR protocol(s) πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

ssize_t show_protocols (struct device *device , struct device_attribute
*mattr , char *buf );

like, that's the whole signature. eat it up. πŸ“


πŸ¦‹ ARGUMENTS πŸ¦‹

  • device β€” the device descriptor 🫢
  • mattr β€” the device attribute struct
  • buf β€” a pointer to the output buffer, ok so this is where the good stuff goes

✨ DESCRIPTION ✨

so this routine? it's a callback routine for input read β€” it does the IR protocol type(s) thing. it gets triggered when someone reads /sys/class/rc/rc?/protocols πŸ“– and it returns the protocol names of the supported protocols. and here's the cute part: the enabled protocols are printed in brackets πŸ”₯ iykyk.

also dev->lock gets taken, and that's on purpose β€” it's guarding against races between store_protocols and show_protocols. literally just keeping things from getting messy, no cap. πŸ”’

bestie be aware: that lock is doing real work, don't be out here thinking it's decorative πŸ’€

🌈 SEE ALSO 🌈

like, that's the whole friend group right there. main character energy from every single one. πŸ‘‘


and that's the page!! 🧚 source is ./drivers/media/rc, and the date on this lil baddie is October 2026 β€” screenshot it, remember it, periodt. πŸ’œπŸ‘‘

πŸ“¦ where this page comes from