VN_ISDISK(9)
π VN_ISDISK(9) π
okay so bestie, welcome to the Kernel Developer's Manual β section 9, kernel-adjacent girlies only π«Ά. today we're learning about a lil function called vn_isdisk, and no cap, it's literally just asking "heyβ¦ is this thing a disk?" π₯
β¨ NAME β¨
vn_isdisk β the vibe check that tells you if a vnode is actually a disk π
πΈ SYNOPSIS πΈ
#include <sys/param.h>
#include <sys/vnode.h>
int
vn_isdisk(struct vnode *vp, int *errp);
like, include both headers, don't skip the second one, it's giving "necessary" π
π¦ DESCRIPTION π¦
so vn_isdisk() checks whether vp represents a disk. that's the whole job. main character energy, honestly π
but here's the tea β for vp to actually count as a disk, all three of these gotta be true, no exceptions:
- it has to be a character device
v_rdevhas to be valid- the
cdevswentry's flags have to haveD_DISKset
miss one and it's not a disk, periodt. π
the arguments, bestie π
vpβ the vnode you're checking. the one on trial, fr fr.errpβ an integer pointer, and if the call fails, that's where the error number gets stored. it's the lil receipt of what went wrong π
β RETURN VALUES β
- if the vnode is a disk β
1is returned. slay π β¨ - otherwise β
0is returned, anderrpwill contain the error number.
that's it. binary. iconic.
π AUTHORS π
this manual page was written by Chad David <davidc@acns.ab.ca>. king behavior, we love a credited author π«Ά
ok that's the whole page, nothing skipped, every flag and fact intact π go forth and check ur disks, bestie.
this came to you from the Debian edition of the manual, dated July 9, 2001 β yes she's vintage, she's still serving πβ¨ bye pookie π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms