debugfs_create_blob(9)
π NAME π
okay bestie, welcome to the debugfs_create_blob(9) page from the Kernel API Manual π this one is all about debugfs_create_blob β the function that creates a debugfs file used to read and write a binary blob. slay.
β¨ SYNOPSIS β¨
struct dentry * debugfs_create_blob (const char *name , umode_t mode ,
struct dentry *parent , struct debugfs_blob_wrapper *blob );
π«Ά ARGUMENTS π«Ά
nameβ a pointer to a string containing the name of the file to create. like, the file's whole identity β¨modeβ the permission that the file should have. set the vibe check for who gets in π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. no parent? it goes straight to the root, main character behavior πblobβ a pointer to astruct debugfs_blob_wrapperwhich contains a pointer to the blob data and the size of the data. the data and its size, wrapped up together π
π DESCRIPTION π
This function creates a file in debugfs with the given name that exports blob->data as a binary blob. if the mode variable is set up to allow it, the file can be read from and written to. iconic.
This function will return a pointer to a dentry if it succeeds. that pointer must be passed to the debugfs_remove function when the file is to be removed β and no automatic cleanup happens if your module is unloaded, you are responsible here. yes, literally you. don't ghost your cleanup π
If an error occurs, ERR_PTR(-ERROR) will be returned.
If debugfs is not enabled in the kernel, the value ERR_PTR(-ENODEV) will be returned. noted, bestie π«‘
π SEE ALSO π
Kernel file ./fs/debugfs/file.c is the hangout spot, and these besties are linked:
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_u32(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_u32_array(9)debugfs_print_regs32(9)debugfs_create_regset32(9)debugfs_create_devm_seqfile(9)
xoxo, bestie π this page came from ./fs/debugfs, stamped October 2026, and it's literally debugfs_create_blob(9). periodt. π¦
π¦ 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