DEVTONAME(9)
π DEVTONAME β the kernel devs' manual, but make it cute π
okay bestie, welcome to DEVTONAME(9), aka the Kernel Developer's Manual page for one lil function that does exactly one lil thing and does it flawlessly. no cap. it's giving "small but mighty." π
β¨ NAME β¨
devtoname β converts a character device into a string that tells you the device name π¦
like. that's the whole job. and she ate. π
πΈ SYNOPSIS πΈ
okay so first you gotta bring in the girls:
#include <sys/param.h>
#include <sys/conf.h>
then, the moment you've been waiting for:
const char *
devtoname(struct cdev *dev);
that's it. that's the whole signature. iconic. π
π DESCRIPTION π
so the devtoname() function hands you back a pointer to the name of the device you passed in. π«Ά
and what is that name, you ask? it's whatever was set to it in make_dev(). that's it. no mystery, no plot twist, no secret second source. whatever make_dev() named it is what you're getting back. periodt. β¨
lowkey important vibe check: the function gives you a pointer to the name β it doesn't make you a fresh copy or anything. just so you know what you're holding. π
π HISTORY π
the devtoname() interface first appeared in FreeBSD 4.0 π she's been here since forever and she's still serving. a true main character. π
and that's the whole page, bestie!! π ty for reading, ily, go name some devices π
this cutie was brought to you by the Debian crew, dated February 10, 2012 β stan them, fr fr π«Άβ¨
π¦ 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) 1999 Chris Costello
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms