sysfs_create_group(9)
π NAME π
okay bestie, welcome to the sysfs_create_group(9) page from the Kernel API Manual β¨ β this one is literally: given a directory kobject, create an attribute group. thatβs the whole vibe π
β¨ SYNOPSIS β¨
int sysfs_create_group (struct kobject *kobj , const struct
attribute_group *grp );
π ARGUMENTS π
kobjβ the kobject youβre putting the group on β like, the kobject to create the group on π«Άgrpβ the attribute group you want to create β yep, the attribute group to create πΈ
πΈ DESCRIPTION πΈ
so this function creates a group for the first time, periodt. it is not being subtle about it: it will explicitly warn and error if any of the attribute files being created already exist π like, no quietly overwriting, no βoopsie,β it warns and errors, fr fr.
return vibe check: 0 on success, or an error code on failure. thatβs it, thatβs the whole thing π
π SEE ALSO π
the kernel file is ./fs/sysfs/group.c, and these are the besties you should also check out:
sysfs_create_groups(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)
mwah π this cutie lives under ./fs/sysfs, is stamped October 2026, and itβs literally the sysfs_create_group(9) page β bye bestie, go create some groups responsibly π«Άπ
π¦ 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