*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> bdevvp (9)              
Title
Content
Arch
Section
 

GETDEVVP(9)

Contents


NAME    [Toc]    [Back]

     getdevvp, bdevvp, cdevvp - create a vnode for a device

SYNOPSIS    [Toc]    [Back]

     #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    [Toc]    [Back]

     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 argument.
  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.

RETURN VALUES    [Toc]    [Back]

     All  functions return 0 on success.  If an error occurs, vpp
will point to
     a NULLVP.  See getnewvnode(9) for further return values.

SEE ALSO    [Toc]    [Back]

      
      
     getnewvnode(9), vnode(9)

OpenBSD     3.6                        February     18,      2002
[ Back ]
 Similar pages
Name OS Title
vfinddev OpenBSD lookup a vnode by device number
makedev IRIX create device special files
MAKEDEV OpenBSD create system and device special files
MAKEDEV OpenBSD create system and device special files
MAKEDEV OpenBSD create system and device special files
MAKEDEV OpenBSD create system and device special files
open Linux open and possibly create a file or device
MAKEDEV OpenBSD create system and device special files
MAKEDEV OpenBSD create system and device special files
MAKEDEV OpenBSD create system and device special files
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service