STRUCT DEV_EXT_ATTRIBUTE(9)
π NAME
okay so bestie, say hi to struct dev_ext_attribute β the iconic little struct that's literally an exported device attribute with extra context, periodt β¨
(also quick vibe check: this is from the Kernel API Manual, section 9 β you're in the kernel dev page, iykyk π )
β¨ SYNOPSIS
like, here's the whole thing, no cap:
struct dev_ext_attribute {
struct device_attribute attr;
void *var;
};
that's it. two members. she's lowkey minimal and we're obsessed π
πΈ MEMBERS
attrβ the exported device attribute itself, main character energy, doing the actual attribute work π¦varβ a pointer to context, aka the little carry-on bag of extra info that comes with her β¨
π SEE ALSO
okay this list is a whole journey, buckle up π«Ά β and yeah, it lives in the kernel file ./include/linux/device.h:
struct subsys_interface(9)struct device_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)enum device_removable(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)
like, that's a friend group π but honestly every single one of them ate π₯
ngl bestie, go read them all. not me being a whole study guide rn ππ
and that's the tea π β brought to you by the source at ./include/linux, dated October 2026, serving struct dev_ext_attribute(9) realness. slay, bye πβ¨
π¦ 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