DEVICE_GET_UNIT(9)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’… DEVICE_GET_UNIT(9) πŸ’…

okay so bestie, welcome to the Kernel Developer's Manual β€” yes, the kernel kernel, main character energy only ✨


✨ NAME ✨

device_get_unit β€” access the unit number of a device πŸŽ€

🌸 SYNOPSIS 🌸

like, include these first, no cap:

#include <sys/param.h>
#include <sys/bus.h>

int
device_get_unit(device_t dev);

πŸ¦‹ DESCRIPTION πŸ¦‹

So this one literally just returns the unit number of the device. that's it. that's the whole vibe. device_t dev goes in, the unit number comes out, slay πŸ’…

πŸ’– SEE ALSO πŸ’–

  • device(9) β€” go read this one too, iykyk 🫢

πŸ‘‘ AUTHORS πŸ‘‘

This manual page was written by Doug Rabson. king behavior fr fr 🌈⭐


and that's the whole page, bestie β€” short and iconic πŸŽ€ this came from the Debian manual, dated June 16, 1998, so it's giving vintage but make it kernel πŸ’œ

πŸ“¦ where this page comes from