sysfs_remove_dir(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… sysfs_remove_dir β€” the sysfs manual, section 9, bestie ✨

okay so you're in the Kernel API Manual, section 9, and the function we're stanning today is sysfs_remove_dir. yes it's a kernel thing. yes it's iconic. let's go 🫢


✨ SYNOPSIS ✨

void sysfs_remove_dir (struct kobject *kobj );

that's it. that's the whole signature. no return value, she just does the thing πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • kobj β€” the object. that's it, that's the whole description the kernel gave us. just "object." lowkey mysterious of them but okay, we respect the brevity πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: the only thing special about this function is that we remove any files in the directory before we remove the directory itself. order matters, bestie β€” you can't just yank the whole thing and dip πŸ™ˆ

and btw, the code that used to live in sysfs_rmdir is now inlined below β€” like, physically inside this function β€” instead of being called separately as its own little function. so if you were looking for sysfs_rmdir, it's not out here living its own life anymore, it got folded in. it's giving "moved back in with the parents" energy 😭

no cap: files first, then the directory. that's the whole entire special sauce πŸ“

🌈 SEE ALSO 🌈

go read those too, iykyk πŸ’–


aaaand that's the page!! mwah πŸ’‹ this came to you from <bold>./fs/sysfs</bold> and it's dated October 2026 β€” yeah, the future, we're just that ahead of schedule β­πŸ‘‘ slay, bye 🧚

πŸ“¦ where this page comes from