GETDEVVP(9)
π 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, orVCHRβ 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
- Copyright (C) 2002 Peter A. Werner. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms