enclosure_remove_device(9)
π enclosure_remove_device(9)
okay bestie, welcome to the Kernel API Manual β yes, that's the manual name, we're in the big leagues now β¨
π NAME π
enclosure_remove_device β literally the function that takes a device out of an enclosure. That's it, that's the whole vibe. Bye-bye device π
π¦ SYNOPSIS π¦
int enclosure_remove_device (struct enclosure_device *edev , struct device *dev );
That's the whole signature, no cap. It hands you back an int, and it takes two things: your struct enclosure_device *edev and your struct device *dev πΈ
π ARGUMENTS π
edevβ the enclosure device itself, your main character π«Άdevβ the device you're removing/putting. Yep, "remove/put" β that's exactly how the original says it, and we're not editing it, we're just reporting the news π
π₯ DESCRIPTION π₯
So what does it actually do? It returns zero on success, or an error. That's the entire deal. Lowkey iconic in its simplicity ngl β no essay, no lore, just: success = 0, otherwise = an error. Periodt π
bestie pls note: the manpage does not spell out any more than that, so I'm not gonna make anything up. Zero on success, an error otherwise. That's the tea β
β SEE ALSO β
Kernel file ./drivers/misc/enclosure.c β and the whole friend group is here π§:
enclosure_find(9)enclosure_for_each_device(9)enclosure_register(9)enclosure_unregister(9)enclosure_component_alloc(9)enclosure_component_register(9)enclosure_add_device(9)
(obviously enclosure_add_device(9) is the one that does the opposite of us, they're like siblings π)
okay and the cute sign-off: this lil beauty lives in ./drivers/misc (that's the source, and also the version, don't ask, it's just how the footer rolls π) and it's dated October 2026. bye bestie, go remove some devices responsibly ππβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms