sysfs_create_groups(9)
π NAME π
okay bestie, welcome to the sysfs_create_groups(9) page from the Kernel API Manual β¨
sysfs_create_groups β given a directory kobject, create a bunch of attribute groups. periodt π
β¨ SYNOPSIS β¨
the signature is giving:
int sysfs_create_groups (struct kobject *kobj , const struct
attribute_group *const *groups );
π ARGUMENTS π
kobjβ thekobjectto create the group on. literally where the group gets made, iykyk.groupsβ the attribute groups to create,NULLterminated. keep that terminator in mind, bestie π«Ά
π¦ DESCRIPTION π¦
okay so here's the tea: this function creates a bunch of attribute groups πΈ
if an error occurs when creating a group, all previously created groups will be removed, unwinding everything back to the original state when this function was called. not me doing a full rollback π it will explicitly warn and error if any of the attribute files being created already exist. so yeah, that's a whole vibe check.
the return is 0 on success, or the error code from sysfs_create_group on failure. slay when it works, dramatic unwind when it doesn't π
π SEE ALSO π
kernel file: ./fs/sysfs/group.c β and the whole squad is here:
sysfs_create_group(9)sysfs_update_groups(9)sysfs_update_group(9)sysfs_remove_group(9)sysfs_remove_groups(9)sysfs_merge_group(9)sysfs_unmerge_group(9)sysfs_add_link_to_group(9)sysfs_remove_link_from_group(9)compat_only_sysfs_link_entry_to_kobj(9)sysfs_group_change_owner(9)sysfs_groups_change_owner(9)
okay bye bestie π source/version: ./fs/sysfs π date: October 2026 β¨
π¦ 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