BUS_RESCAN(9)

πŸ’– BUS_RESCAN(9) πŸ’–

okay so bestie, welcome to the Kernel Developer's Manual page for BUS_RESCAN(9). it's giving bus-rescan main character energy, and honestly? iconic. πŸ’…


✨ NAME ✨

BUS_RESCAN β€” rescan a bus checking for devices that have been added or removed. no cap, that's literally the whole name vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

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

void
BUS_RESCAN(device_t dev);

so yeah, you include those headers, then call BUS_RESCAN(device_t dev), and it returns void. simple. slay. ✨


πŸŽ€ DESCRIPTION πŸŽ€

The BUS_RESCAN() method is called to request a rescan of the child devices on a bus device. it's basically the bus saying "hey, who's new and who left?" 🫢

The method should add any devices that have been added since the previous scan and remove devices that have been removed. so if a device showed up since last time, add it; if it ghosted, remove it. periodt. πŸ’–

Important caveat, bestie: this method is not required to re-examine existing devices to determine if their properties have changed. so don't expect it to do a whole deep dive on devices that were already there. πŸ™ˆ
Another one: this method is also not required to propagate the rescan request to child devices. so it's not obligated to pass that request down the chain. πŸ’€

🌈 SEE ALSO 🌈

  • device(9) β€” go read that one too, bestie, it's part of the lore. πŸ“–

xoxo πŸ’– source/version: Debian β€” date: April 27, 2016 β€” page: BUS_RESCAN(9). mwah πŸ’‹

πŸ“¦ where this page comes from