VCOUNT(9)
π VCOUNT(9) π
okay bestie, welcome to VCOUNT(9) from the Kernel Developer's Manual β yes it's a section 9 page, yes it's for kernel devs, yes you're gonna eat this up π
β¨ NAME β¨
vcount, count_dev β get total number of references to a device π
πΈ SYNOPSIS πΈ
#include <sys/param.h>
#include <sys/time.h>
#include <sys/conf.h>
#include <sys/vnode.h>
int
vcount(struct vnode *vp);
int
count_dev(struct cdev *dev);
like, copy those includes exactly, they're not decorative bestie π
π¦ DESCRIPTION π¦
So vcount() is the girl who counts how many references there are to one specific device. The whole reason she exists? Because multiple vnodes can reference the same device β and she's built to handle that reality, no cap. π
count_dev() does the exact same thing as vcount(), but instead of taking a struct vnode pointer as its argument, it takes a struct cdev. Same energy, different entry point π
π RETURN VALUES π
Both vcount() and count_dev() return the number of references to the device. That's it. That's the whole return value. Periodt. β¨
π SEE ALSO π
go read those too, iykyk π«Ά
π AUTHORS π
This manual page was written by Andrew Stevenson. icon behavior, honestly π
and that's the whole page bestie!! this one shipped from Debian, dated January 19, 2012 β so like, it's older than most of the internet but it still slays πβ¨ mwah, go count some device references π¦π
π¦ 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) 2000 Andrew Stevenson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms