VN_ISDISK(9)
π 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
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms