vn_isdisk(9freebsd)

vn_isdisk9freebsd

Checks if a vnode represents a disk

Usage

#include <sys/param.h>

#include <sys/vnode.h>

int

vn_isdisk(struct vnode *vp, int *errp);

Overview

The vn_isdisk() function checks to see if vp represents a disk. In order for vp to be a disk, it must be a character device, v_rdev must be valid, and the cdevsw entry's flags must have D_DISK set.

Its arguments are:

vp

The vnode to check.

errp

An integer pointer to store the error number in if the call fails.

Return values

If the vnode represents a disk, 1 is returned; otherwise, 0 is returned and errp will contain the error number.

Releases

9 releases since Debian 5.0 (Lenny); the text changed 6 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11–13

Authors

This manual page was written by Chad David ⟨[email protected]⟩.

From freebsd-manpages 12.2-2 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.