DEVICE_SHUTDOWN(9)
π DEVICE_SHUTDOWN β the kernel dev manual, bestie edition π
okay so you're reading DEVICE_SHUTDOWN(9) from the Kernel Developer's Manual and honestly? you're in the right place. pull up a chair π
β¨ NAME β¨
DEVICE_SHUTDOWN β it gets called during system shutdown, no biggie π
πΈ SYNOPSIS πΈ
#include <sys/param.h>
#include <sys/bus.h>
int
DEVICE_SHUTDOWN(device_t dev);
look at that signature. she's serving exactly one device_t and returning an int. iconic behavior, fr fr β¨
π¦ DESCRIPTION π¦
so here's the vibe: the DEVICE_SHUTDOWN() method gets called during system shutdown. and why, you ask? because it lets the driver put the hardware into a consistent state for rebooting the computer π«Ά
that's it. that's the whole job. your driver gets one last moment on stage before the machine goes night-night, and you better use it to leave the hardware in a state that won't be embarrassing on the way back up π
no cap: this is your driver's curtain call. handle it with the main character energy it deserves π
π« RETURN VALUES π«
- Zero β returned on success π slay
- anything else β an error gets returned π
that's the whole deal. zero = good, non-zero = not good. iykyk π
π§ SEE ALSO π§
go read the whole friend group, they're all connected besties π
π AUTHORS π
This manual page was written by Doug Rabson. king behavior, we love to see it π
and that's the whole page, bestie!! written on the Debian side of things, dated January 6, 2005, and yeah β that's genuinely the whole DEVICE_SHUTDOWN(9) situation. 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) 1998 Doug Rabson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms