debugfs_create_u32(9)
π debugfs_create_u32 π
okay so bestie, welcome to the Kernel API Manual entry for debugfs_create_u32 β yes that's the whole title, we're being formal today. this one's short and sweet and honestly kind of iconic: it's the function that makes you a debugfs file for reading and writing an unsigned 32-bit value. slay. π
β¨ NAME β¨
debugfs_create_u32 β create a debugfs file that is used to read and write an unsigned 32-bit value. that's it, that's the vibe. π
π¦ SYNOPSIS π¦
void debugfs_create_u32 (const char *name , umode_t mode , struct dentry
*parent , u32 *value );
literally copy it exactly like that, no cap. the line break is in there and i'm not touching it, that's just how the page is. π
πΈ ARGUMENTS πΈ
nameβ a pointer to a string containing the name of the file to create. so like, what you want your file to be called. main character naming energy. πmodeβ the permission that the file should have. this one decides whether people can actually read from it and write to it, so think before you set it fr fr. πparentβ a pointer to the parent dentry for this file. this should be a directory dentry if set. if this parameter isNULL, then the file will be created in the root of the debugfs filesystem. soNULL= home base, no questions. πvalueβ a pointer to the variable that the file should read to and write from. yes, the actual live variable. the file is basically a little window into it, iykyk. πͺ
π DESCRIPTION π
okay so here's the whole deal. this function creates a file in debugfs with the given name that contains the value of the variable value. π«Ά
and if the mode variable is so set, it can be read from, and written to. that's the entire description. short, sweet, ate and left no crumbs. π
just a heads up, bestie: the read/write goodness is gated on mode β that part is conditional, so don't come for me if you set a weird mode and nothing happens. π«
π₯ SEE ALSO π₯
Kernel file ./fs/debugfs/file.c β plus this whole little friend group of related functions:
debugfs_file_get(9)debugfs_file_put(9)debugfs_enter_cancellation(9)debugfs_leave_cancellation(9)debugfs_create_u8(9)debugfs_create_u16(9)debugfs_create_u64(9)debugfs_create_ulong(9)debugfs_create_x8(9)debugfs_create_x16(9)debugfs_create_x32(9)debugfs_create_x64(9)debugfs_create_size_t(9)debugfs_create_atomic_t(9)debugfs_create_bool(9)debugfs_create_str(9)debugfs_create_blob(9)debugfs_create_u32_array(9)debugfs_print_regs32(9)debugfs_create_regset32(9)debugfs_create_devm_seqfile(9)
like a whole squad of debugfs creators. u32 is just the one who peaked in the group chat. π
and that's the page!! this absolute gem comes from ./fs/debugfs in the Kernel API Manual, dated October 2026 β same name top and bottom, debugfs_create_u32(9), all cute and symmetrical. go read and write some unsigned 32-bit values, bestie, you've got this πβ¨π
π¦ 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