VN_ISDISK(9)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’… VN_ISDISK(9) β€” bestie, it's a Kernel Developer's Manual moment

okay so welcome to the VN_ISDISK(9) page from the Kernel Developer's Manual. This is the whole vibe: checking if a vnode represents a disk. iconic behavior, no cap.


🌸 NAME 🌸

vn_isdisk β€” checks if a vnode represents a disk. That's it. That's the main character energy. 🫢

✨ 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 πŸ¦‹

okay so the vn_isdisk() and vn_isdisk_error() functions check to see if vp represents a disk. lowkey their whole job. πŸ’…

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. That's the checklist, bestie β€” all three, fr fr.

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. periodt. πŸ’–

πŸ‘‘ AUTHORS πŸ‘‘

This manual page was written by Chad David <davidc@acns.ab.ca>. πŸ‘‘βœ¨


okay bye bestie β€” this was the Debian June 28, 2021 VN_ISDISK(9) page, signing off with a πŸŽ€ and all the good vibes. πŸ’œ

πŸ“¦ where this page comes from