attribute_c...er_add_attrs(9)
π attribute_container_add_attrs β add attributes β¨
okay so real talk, this one lives in the Kernel API Manual bestie, and it's genuinely one of the cozier little functions in the attribute container saga π
πΈ NAME πΈ
attribute_container_add_attrs β adds attributes, that's literally the whole job π
β¨ SYNOPSIS β¨
int attribute_container_add_attrs (struct device *classdev );
π¦ ARGUMENTS π¦
classdevβ the class device. that's it. that's the one thing you hand it π«Ά
π DESCRIPTION π
so what does it actually do? it simply creates all the class device sysfs files from the attributes listed in the container β¨ like, every single one of them, no skipping, no picking faves π
that's the vibe. it's giving "just make the files bestie" and honestly we love a function with a clear purpose π
π₯ SEE ALSO π₯
- Kernel file
./drivers/base/attribute_container.c attribute_container_classdev_to_container(9)attribute_container_register(9)attribute_container_unregister(9)attribute_container_add_device(9)attribute_container_remove_device(9)attribute_container_device_trigger_safe(9)attribute_container_device_trigger(9)attribute_container_add_class_device(9)attribute_container_remove_attrs(9)attribute_container_class_device_del(9)attribute_container_find_class_device(9)
like, the whole friend group fr fr β go read the rest of them, iykyk π
ngl the source for this one is ./drivers/base, and it's dated October 2026 β so yeah, that's the whole page, go off bestie, mwah ππ§β
π¦ 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