GETDEVVP(9) BSD Kernel Manual GETDEVVP(9)
getdevvp, bdevvp, cdevvp, - create a vnode for a device
#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);
The getdevvp() function creates a vnode for a device of type type with a device number of dev, and returns a pointer to it in vpp. Its arguments are: dev The device number of the desired device. vpp Where the vnode will be returned on success. type The type of device, either: VBLK For a block device, or VCHR for a character device. bdevvp() and cdevvp() use getdevvp internally, specifying the third argu- ment. bdevvp() will create a vnode for a block device, and is used for the root file system and swap areas, among other things. cdevvp() will create a vnode for a character device and is used in kernfs and in some console handling.
All functions return 0 on success. If an error occurs, vpp will point to a NULLVP. See getnewvnode(9) for further return values.
getnewvnode(9), vnode(9) MirOS BSD #10-current February 18, 2002 1
Generated on 2016-04-09 18:24:16 by $MirOS: src/scripts/roff2htm,v 1.83 2016/03/26 23:38:28 tg Exp $
These manual pages and other documentation are copyrighted by their respective writers;
their source is available at our CVSweb,
AnonCVS, and other mirrors. The rest is Copyright © 2002–2016 The MirOS Project, Germany.
This product includes material provided by mirabilos.
This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.