cgroup_add_legacy_cftypes(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ cgroup_add_legacy_cftypes(9) β€” straight out of the Kernel API Manual, bestie πŸ’–

okay so picture this: you're deep in the kernel, you've got a cgroup subsystem, and you've got a whole lil array of cftypes that should only show up in the legacy hierarchies. that's the whole vibe of this function. it's giving "backwards compatibility, but make it intentional." 🌸


✨ NAME ✨

cgroup_add_legacy_cftypes β€” add an array of cftypes for legacy hierarchies πŸ‘‘

like, yes, that's it, that's the job. she adds, she's legacy, she's an array. iconic behavior fr fr.


πŸ¦‹ SYNOPSIS πŸ¦‹

int cgroup_add_legacy_cftypes (struct cgroup_subsys *ss , struct cftype
*cfts );

no cap, that's the exact signature. copy it, don't @ me πŸ’…


πŸ“ ARGUMENTS πŸ“

  • ss β€” the target cgroup subsystem 🎯 like, which subsystem are we decorating today, bestie?
  • cfts β€” a zero-length name terminated array of cftypes πŸŽ€ read that again: the array ends when you hit a name with zero length. that's the terminator. that's the whole stop condition. don't forget it, i'm begging πŸ™ˆ

πŸ’œ DESCRIPTION πŸ’œ

so this is basically cgroup_add_cftypes's slightly more exclusive sibling ✨ β€” super similar, same general energy β€” but (and this is the main character detail) the files it adds are only used for the legacy hierarchies. not the new ones. legacy only. she said "i don't do modern." πŸ’€

that's literally the whole distinction. same as cgroup_add_cftypes, except legacy-only. periodt 🫢


🌈 SEE ALSO 🌈

okay so the source file for all this is ./kernel/cgroup/cgroup.c β€” here's the full friend group, and yes, i'm listing every single one because we don't do "etc." in this house πŸ’–

that's the whole squad, no one left behind 🫢✨


lowkey reminder bestie: cfts has to be zero-length name terminated or this whole thing goes sideways. the terminator is not optional, it's the vibe check πŸ’€

and that's the page!! 🌟 this came out of ./kernel/cgroup in October 2026 β€” mwah, love her, she ate, no notes πŸ‘‘πŸ’… see u in the next manpage bestie πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from