---
name: "vn_isdisk"
section: "9"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/vn_isdisk"
---

# vn\_isdisk(9)

checks if a vnode represents a disk

## NAME

**vn\_isdisk** – checks if a vnode represents a disk

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<sys/vnode.h\>**

*bool*\

**vn\_isdisk**(*struct vnode \*vp*);

*bool*\

**vn\_isdisk\_error**(*struct vnode \*vp*, *int \*errp*);

## DESCRIPTION

The **vn\_isdisk**() and **vn\_isdisk\_error**() functions check 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.

The 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, true is returned; otherwise, false is returned and *errp* will contain the error number.

## AUTHORS

This manual page was written by Chad David ⟨*davidc@acns.ab.ca*⟩.
