attribute_co...ner_register(9)
π NAME π
attribute_container_register β bestie, this is the one that registers an attribute container. That's it. That's the whole vibe. β¨
π SYNOPSIS π
void attribute_container_register (struct attribute_container *cont );
Okay so it returns void, meaning it hands you back absolutely nothing β no little gift, no error code, no vibe check, just void. Slay, but also π note that.
πΈ ARGUMENTS πΈ
contβ the container you're registering, periodt. And listen, this one's on you: it must be allocated by the callee β that's you, you're the callee here, no cap β and it should also be zeroed by it. So: allocate it, zero it, then come talk to this function. Not the other way around, iykyk. π«Ά
π¦ SEE ALSO π¦
The source lives in the kernel file ./drivers/base/attribute_container.c β go peek if you're feeling nosy π
And here's the whole friend group, in order, no one left out:
attribute_container_classdev_to_container(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_attrs(9)attribute_container_add_class_device(9)attribute_container_remove_attrs(9)attribute_container_class_device_del(9)attribute_container_find_class_device(9)
Lowkey a whole squad π go read them, they're iconic π
π friendly reminder: cont has to be allocated and zeroed by you before it shows up here. Not me being dramatic, that's literally in the ARGUMENTS section. π₯
That's the whole page, bestie β much love from the ./drivers/base directory, October 2026 edition of the Kernel API Manual. 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