DEVICE_ATTR_ADMIN_RW(9)
π DEVICE_ATTR_ADMIN_RW π
okay so bestie, welcome to the Kernel API Manual β this one's a tiny little macro page but it's lowkey iconic, and honestly it's giving "small but powerful" main character energy β¨
πΈ NAME πΈ
DEVICE_ATTR_ADMIN_RW β Define an admin-only read-write device attribute. π
β¨ SYNOPSIS β¨
DEVICE_ATTR_ADMIN_RW (_name );
π¦ ARGUMENTS π¦
_nameβ the attribute name. that's it. that's the whole vibe check. π
π DESCRIPTION π
So basically, this macro is exactly like DEVICE_ATTR_RW, no cap β except _mode is 0600. π«Ά
ngl that 0600 is the whole point, girlies β it's admin-only, meaning the file perms lock everyone else out. that's the flex. π
π₯ SEE ALSO π₯
- Kernel file
./include/linux/device.h
and like, the whole extended friend group:
struct subsys_interface(9)struct device_attribute(9)struct dev_ext_attribute(9)DEVICE_ATTR(9)DEVICE_ATTR_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 I said. the whole group chat. ππ
okayyy and that's the page!! mwah π this one came from ./include/linux, dated October 2026 in the Kernel API Manual β slay, go read some kernel source bestie, ily 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