VOP_REVOKE(9)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’… VOP_REVOKE(9) β€” the kernel dev manual, bestie edition

okay so real talk, this one's from the Kernel Developer's Manual and it's all about taking access away from a device. dramatic? yes. necessary? also yes. let's get into it πŸŽ€


✨ NAME ✨

VOP_REVOKE β€” revoke access to a device and its aliases

like, all of it. the whole vibe. gone. πŸ”₯


🌸 SYNOPSIS 🌸

#include <sys/param.h>
#include <sys/vnode.h>

int
VOP_REVOKE(struct vnode *vp, int flags);

yes bestie, both includes, don't skip either one, sys/param.h and sys/vnode.h πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so VOP_REVOKE() does a little administrative slay: it revokes access to the device specified by vp, and also to any aliases that were created via make_dev_alias(9). all of them. the whole friend group πŸ’…

and like, after that? any further file operations on any of these devices by processes that have them open will nominally fail. not me ruining everyone's day 😭 but that's literally the point.

the flags must be set to REVOKEALL to signify that all access will be revoked. any other value is invalid β€” like, don't try it, it's not a vibe check you're gonna pass πŸ™ˆ


πŸ”’ LOCKS πŸ”’

the vp must be exclusively locked on entry, and it will remain locked upon return. so it goes in locked, it comes out locked β€” main character energy, no cap ✨


πŸ‘‘ SEE ALSO πŸ‘‘

go read them, iykyk 🫢


πŸ’œ AUTHORS πŸ’œ

this manual page was written by Brian Fundakowski Feldman. thank you icon, we appreciate you 🌈⭐


k bye bestie, go revoke something responsibly πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«ΆπŸ˜­πŸ”₯πŸ‘‘πŸŒˆβ­πŸ’€πŸ™ˆπŸ“πŸ§šπŸ’œ

this page came to you from Debian, dated June 20, 2019 β€” mwah, mwah, periodt πŸŽ€

πŸ“¦ where this page comes from