DEVTONAME(9)
π DEVTONAME(9) β like, the whole vibe β¨
okay so real talk: this one is from the Kernel Developer's Manual, section 9, and it's genuinely one of the shortest little slays in the whole kernel docs. no cap, she's tiny but she matters. π
πΈ NAME πΈ
devtoname β converts character device into a string indicating the device name π
like, you hand her a character device and she hands you back the name as a string. that's the whole gig. iconic behaviour, honestly.
β¨ SYNOPSIS β¨
#include <sys/param.h>
#include <sys/conf.h>
const char *
devtoname(struct cdev *dev);
both includes are required, bestie β <sys/param.h> and <sys/conf.h>. don't skip either one, i'm begging π«Ά
π¦ DESCRIPTION π¦
The devtoname() function returns a pointer to the name of the device passed to it. π
and where does that name come from?? it's whatever was set to it in make_dev(). that's it. that's the tea. make_dev() names the baby, devtoname() tells you the baby's name. π
heads up: she returns a pointer, not a copy β so it's referring to the name, not making you a fresh one. π
π HISTORY π
The devtoname() interface first appeared in FreeBSD 4.0. β a legend was born, periodt.
<div align="center">πΈ π πΈ</div>
and that's the whole page, bestie β short, sweet, and absolutely ate. this cutie came to you courtesy of Debian, dated February 10, 2012 π mwah, go name some devices π§β¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 1999 Chris Costello
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms