rpmb_dev_find_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… rpmb_dev_find_device(9) β€” like, the whole kernel API manual vibe ✨

okay so bestie, welcome to rpmb_dev_find_device(9) β€” yes that's the man page name, yes it's a 9 section kernel API joint, we're in the big leagues now πŸŽ€


🌸 NAME 🌸

rpmb_dev_find_device β€” returns the first matching rpmb device. literally that's the whole personality πŸ’–


✨ SYNOPSIS ✨

struct rpmb_dev * rpmb_dev_find_device (const void *data , const struct
rpmb_dev *start , int (*match)(struct device *dev, const void *data) );

three args, one return, no drama 🌈


πŸ¦‹ ARGUMENTS πŸ¦‹

  • data β€” the data you're handing off to the match function. it's just vibes for the matcher, ok? πŸ™ˆ
  • start β€” the rpmb device you wanna begin with. your starting point, your main character ✨
  • match β€” the matching function itself. this is the whole test, the vibe check, the moment of truth πŸ”₯

πŸ’œ DESCRIPTION πŸ’œ

so here's what happens, fr fr: it iterates over all the registered RPMB devices, and it calls match for each one, passing it the RPMB device and data 🫢

the return value of match gets checked on every single call. and if it returns anything other than 0? boom β€” break, and return that found RPMB device. not me getting emotional over a loop πŸ₯Ή

⚠️ okay important bestie: it's the caller's responsibility to call rpmb_dev_put on the returned device when it's done with it. do not skip this. do not ghost the refcount. that's it, that's the warning πŸ’€

⭐ RETURN ⭐

a matching rpmb device, or NULL on failure. simple as that πŸ“


🧚 SEE ALSO 🧚

Kernel file ./drivers/misc/rpmb-core.c, plus the whole friend group:


okay that's the page!! shoutout to ./drivers/misc for housing all of this, and to October 2026 for the timestamp β€” periodt, go call rpmb_dev_put, ily, bye πŸ’…πŸ‘‘

πŸ“¦ where this page comes from