debugfs_change_name(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… debugfs_change_name β€” like, the Kernel API Manual (section 9) page, bestie

okay so picture this: you're deep in debugfs and you want a thing to have a different name. not a new thing. same thing. new name. that's this function. it's giving rebrand era, and honestly? iconic. ✨


πŸŽ€ SYNOPSIS

int  debugfs_change_name (struct dentry *dentry , const char *fmt , ...
);

like yes, it's int, it takes a struct dentry *, a const char * format, and then a lil ... tail of variable arguments. we love an ellipsis. she contains multitudes. πŸ’–


🌸 ARGUMENTS

  • dentry β€” the dentry of an object that's getting renamed. this is the glow-up target, the main character, the one whose name is about to change. no cap.
  • fmt β€” the format for the new name. so yeah, it's printf-style coded, which means ... is doing real work here.
  • ... β€” variable arguments. the supporting cast. the vibes. ✨

πŸ¦‹ DESCRIPTION

okay so here's the tea 🍡: this function renames a file/directory in debugfs. that's literally it, that's the whole assignment, and she ate.

but bestie, listen to the caveat because it matters: the target must not exist for the rename to succeed. like if something's already chilling at that name, the rename does not go through. no dupe names, not today. 🚫

and the return values, because we're paying attention:

  • it'll return 0 on success 😌 (the good ending)
  • and -E... on failure πŸ’€ (the error family, expressed as -E... β€” that's exactly how the page puts it, don't come for me)
🫢 also, important: if debugfs is not enabled in the kernel, the value -ENODEV will be returned. so if you're getting -ENODEV and you're like "???" β€” that's your answer. she's not even built in.

πŸ‘‘ SEE ALSO

like that's the whole friend group right there. a whole squad of debugfs besties. 🌈


mwah πŸ’‹ and that's the page! brought to you by the manual debugfs_change_name(9), filed under Kernel API Manual, living in source ./fs/debugfs, dated October 2026. go forth and rename responsibly, bestie β€” and remember, the target must not already exist. periodt. πŸŽ€βœ¨

πŸ“¦ where this page comes from