GETDEVVP(9)

πŸ“¦ in nixpkgs unstable

πŸ’… GETDEVVP πŸ’…

okay bestie, welcome to the getdevvp(9) page β€” it's a kernel developer's manual situation, and honestly? it's giving "small but mighty." three little functions, one job: making vnodes for devices. slay. πŸŽ€


✨ NAME ✨

getdevvp, bdevvp, cdevvp β€” create a vnode for a device πŸ¦‹


🌸 SYNOPSIS 🌸

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

int
getdevvp(dev_t dev, struct vnode **vpp, enum vtype type);

int
bdevvp(dev_t dev, struct vnode **vpp);

int
cdevvp(dev_t dev, struct vnode **vpp);

πŸ’– DESCRIPTION πŸ’–

so the getdevvp() function is the main character here β€” it creates a vnode for a device of type type with a device number of dev, and hands you back a pointer to it in vpp. literally that's it, that's the vibe. ✨

🫢 its arguments are:

  • dev β€” the device number of the desired device. like, which device you want. no cap.
  • vpp β€” where the vnode will be returned on success. this is your output spot, bestie πŸ’…
  • type β€” the type of device, and it's either:
    • VBLK β€” for a block device, or
    • VCHR β€” for a character device.

bdevvp() and cdevvp() are lowkey just getdevvp with the third argument pre-filled β€” they use getdevvp internally, specifying the third argument for you. iconic of them honestly. 🌈

  • bdevvp() will create a vnode for a block device, and it's used for the root file system and swap areas, among other things. very main character energy. πŸ‘‘
  • cdevvp() will create a vnode for a character device and it's used in console handling. also serving. πŸ“

πŸ”₯ RETURN VALUES πŸ”₯

all functions return 0 on success. periodt. πŸ’―

if an error occurs, vpp will point to NULL β€” so like, don't go dereferencing that expecting a vnode, bestie, it's not there 😭

see getnewvnode(9) for further return values β€” there's more tea over there πŸ«–

πŸ‘€ SEE ALSO πŸ‘€


okay that's the whole page, you ate that πŸ’…βœ¨ and for the credits: this one's from Debian, dated September 20, 2025, and it's filed under GETDEVVP(9) β€” mwah, kisses, go read some vnode lore πŸ§šπŸ’œ

πŸ“¦ where this page comes from
  • nixpkgs unstable: cvs-export
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms