ENUM DEVICE_REMOVABLE(9)
β¨ enum device_removable(9) β¨
okay so bestie, welcome to the Kernel API Manual β this one's the enum device_removable page, and it's literally the glow-up guide for figuring out whether a device can be yanked out or not π
π NAME π
enum device_removable β Whether the device is removable. The criteria for a device to be classified as removable is determined by its subsystem or bus.
like, the enum itself doesn't decide anything, your subsystem or bus is the one doing the vibe check π
πΈ SYNOPSIS πΈ
enum device_removable {
DEVICE_REMOVABLE_NOT_SUPPORTED ,
DEVICE_REMOVABLE_UNKNOWN ,
DEVICE_FIXED ,
DEVICE_REMOVABLE
};
π Constants π
okay these are the four moods a device can be in, no cap:
DEVICE_REMOVABLE_NOT_SUPPORTEDβ This attribute is not supported for this device (default). like it's giving "we don't even do that here" π and yes, it's the default, so if nobody says otherwise, this is what you get.DEVICE_REMOVABLE_UNKNOWNβ Device location is Unknown. the device is being mysterious and mysterious is not it πDEVICE_FIXEDβ Device is not removable by the user. it lives there now, it's a fixture, main character energy of a houseplant πͺ΄DEVICE_REMOVABLEβ Device is removable by the user. go ahead bestie, unplug it, slay β¨
π¦ SEE ALSO π¦
here's the whole friend group, all from the Kernel file ./include/linux/device.h π«Ά:
struct subsys_interface(9)struct device_attribute(9)struct dev_ext_attribute(9)DEVICE_ATTR(9)DEVICE_ATTR_RW(9)DEVICE_ATTR_ADMIN_RW(9)DEVICE_ATTR_RW_NAMED(9)DEVICE_ATTR_RO(9)DEVICE_ATTR_ADMIN_RO(9)DEVICE_ATTR_RO_NAMED(9)DEVICE_ATTR_WO(9)DEVICE_ATTR_WO_NAMED(9)DEVICE_ULONG_ATTR(9)DEVICE_INT_ATTR(9)DEVICE_BOOL_ATTR(9)DEVICE_STRING_ATTR_RO(9)enum device_link_state(9)enum dl_dev_state(9)struct dev_links_info(9)struct dev_msi_info(9)enum device_physical_location_panel(9)enum device_physical_location_vertical_position(9)enum device_physical_location_horizontal_position(9)struct device_physical_location(9)enum struct_device_flags(9)struct device(9)struct device_link(9)device_set_driver_override(9)device_has_driver_override(9)device_match_driver_override(9)device_iommu_mapped(9)dev_name(9)dev_bus_name(9)device_find_child_by_name(9)device_find_any_child(9)device_lock_set_class(9)device_lock_reset_class(9)
and that's the whole page, bestie, you ate it up π this iconic little number lives at ./include/linux, dated October 2026, and yes β it's still enum device_removable(9) at the bottom too, because consistency is a flex πβ¨
π¦ 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