debugfs_create_u16(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– debugfs_create_u16(9) πŸ’–

okay so bestie, welcome to the debugfs_create_u16(9) page from the Kernel API Manual β€” this is the one that makes a debugfs file you can read and write an unsigned 16-bit value through ✨


🌸 NAME 🌸

debugfs_create_u16 β€” create a debugfs file that is used to read and write an unsigned 16-bit value. that's it, that's the whole vibe πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

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

literally the whole signature. four things in, no return value out. slay πŸ’…


✨ ARGUMENTS ✨

  • name β€” a pointer to a string containing the name of the file to create. pick something cute, it's your file's whole identity fr 🫢
  • mode β€” the permission that the file should have. this is the gatekeeping setting, so choose wisely πŸ‘‘
  • 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 πŸ—‚οΈ
  • value β€” a pointer to the variable that the file should read to and write from. this is the main character β€” the file is literally an interface to this variable πŸ’–

πŸ’œ 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. no cap, that's the whole thing β€” name it, set its perms, point it at your u16, and now you have a debugfs file wearing your variable's outfit 🌈

ngl the "if the mode variable is so set" part is doing a lot of work there β€” the read/write access is gated on how you set that permission. keep that in mind bestie πŸ™ˆ

🌟 SEE ALSO 🌟

Kernel file ./fs/debugfs/file.c β€” plus the whole friend group:


okay that's the page!! πŸ“ this little icon came from the ./fs/debugfs source, dated October 2026, and it's served fresh from the Kernel API Manual β€” go forth and make your 16-bit debugfs files, bestie, you're gonna do amazing πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from