debugfs_create_str(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so, debugfs_create_str(9) from the Kernel API Manual is literally the little helper for making a debugfs file that reads and writes a string value. no cap, it’s giving β€œtiny kernel string door” energy 🫢✨

🌸 NAME 🌸

debugfs_create_str β€” create a debugfs file that is used to read and write a string value. periodt πŸ’…

✨ SYNOPSIS ✨

bestie, here’s the signature exactly as it lives:

void debugfs_create_str (const char *name , umode_t mode , struct dentry
       *parent , char **value );

πŸŽ€ ARGUMENTS πŸŽ€

  • name β€” a pointer to a string containing the name of the file to create. it’s literally the filename vibe 🌸
  • mode β€” the permission that the file should have. permission check, slay πŸ”₯
  • parent β€” a pointer to the parent dentry for this file. this should be a directory dentry if set. if this parameter is NULL, then the file will be created in the root of the debugfs filesystem. root energy, iykyk πŸ‘‘
  • value β€” a pointer to the variable that the file should read to and write from. this pointer and the string it points to must not be NULL. 🚨 like, do not pass NULL here, bestie β€” the page says must not, fr fr
tiny but important: value and the string it points to must not be NULL. no exceptions πŸ’€

πŸ’… DESCRIPTION πŸ’…

this function creates a file in debugfs with the given name that contains the value of the variable value. if the mode variable is so set, it can be read from, and written to. that’s the whole vibe: name it, put it in debugfs, and let the read/write happen if mode says so. ✨

πŸ¦‹ SEE ALSO πŸ¦‹

peep these, bestie β€” the whole debugfs friend group:


mwah πŸ’‹ β€” source/version ./fs/debugfs, date October 2026, page debugfs_create_str(9). that’s the sign-off, bestie πŸŽ€πŸ’–

πŸ“¦ where this page comes from