DEVICE_PRINTF(9)
π DEVICE_PRINTF π
okay bestie, so this one lives in the Kernel Developer's Manual (section 9, iykyk) and it's literally the cutest lil wrapper around printf(9) you've ever seen. it's giving "I just want to print something and also say WHO printed it" energy. no cap. π
β¨ NAME β¨
device_printf β formatted output conversion
πΈ SYNOPSIS πΈ
#include <sys/param.h>
#include <sys/bus.h>
int
device_printf(device_t dev, const char *fmt, ...);
π¦ DESCRIPTION π¦
so device_printf() is a convenience interface to the printf(9) function. it's the bestie who does the annoying part for you. π«Ά
here's the tea: it outputs the name of the dev device, then a colon and a space after it, and then everything that printf(9) would print if you just passed it fmt and the remaining arguments. so you get your device name pre-labeled like a lil name tag at a party, and then your actual message right after. iconic behavior honestly. π
π₯ RETURN VALUES π₯
device_printf() returns the number of characters displayed. that's it, that's the whole thing. slay. β¨
π SEE ALSO π
lowkey the whole point is just "print stuff, but with the device name attached" and honestly? we respect the simplicity. π
and that's a wrap, bestie π¦ β this page came from Debian, dated April 21, 2003, and the manual it belongs to is DEVICE_PRINTF(9). go forth and print things. periodt. πβ¨
π¦ 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) 2003 M. Warner Losh
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms