sysfs_rename_link_ns(9)
π sysfs_rename_link_ns β a Kernel API Manual moment
okay so real talk, this page lives in the Kernel API Manual (section 9, kernel-space girlies only π«Ά) and it's literally called sysfs_rename_link_ns. Yes the whole name. It's a mouthful and we love her for it π
β¨ NAME β¨
sysfs_rename_link_ns β the glow-up where a symlink gets a whole new name in its object's directory π
πΈ SYNOPSIS πΈ
int sysfs_rename_link_ns (struct kobject *kobj , struct kobject *targ ,
const char *old , const char *new , const struct ns_common *new_ns );
like yes she returns an int, no we don't gossip about what it means here, moving on bestie β¨
π¦ ARGUMENTS π¦
kobjβ the object we're acting for, aka the main character whose directory we're doing all this in πtargβ the object we're pointing to, aka the one the symlink is lowkey obsessed with π₯°oldβ the previous name of the symlink, the pre-glow-up era, we don't talk about her πnewβ the new name of the symlink, the rebrand, the era-defining moment π₯new_nsβ the new namespace of the symlink,const struct ns_common *energy, very demure, very namespace π§
π DESCRIPTION π
So basically this is a helper function for the common rename-symlink idiom. That's it. That's the whole vibe. It exists because people keep doing this exact thing over and over and honestly? iconic of it to just show up and handle it for you π β¨
Like the way it's just a little helper doing the most common little rename task... no cap, it ate π
π SEE ALSO π
Kernel file ./fs/sysfs/symlink.c and its whole friend group, all of whom you should also know:
sysfs_create_link_sd(9)sysfs_create_link(9)sysfs_create_link_nowarn(9)sysfs_delete_link(9)sysfs_remove_link(9)
go follow them, they're mutuals, iykyk π«Ά
and that's the whole page bestie!! brought to you by ./fs/sysfs, dated October 2026, and signed off by your girl sysfs_rename_link_ns(9) herself β drink water, close your brackets, and rename those symlinks 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