1DEBUGFS_CREATE_BLOB(9) The debugfs filesystem DEBUGFS_CREATE_BLOB(9)
2
3
4
6 debugfs_create_blob - create a debugfs file that is used to read a
7 binary blob
8
10 struct dentry * debugfs_create_blob(const char * name, umode_t mode,
11 struct dentry * parent,
12 struct debugfs_blob_wrapper * blob);
13
15 name
16 a pointer to a string containing the name of the file to create.
17
18 mode
19 the permission that the file should have
20
21 parent
22 a pointer to the parent dentry for this file. This should be a
23 directory dentry if set. If this parameter is NULL, then the file
24 will be created in the root of the debugfs filesystem.
25
26 blob
27 a pointer to a struct debugfs_blob_wrapper which contains a pointer
28 to the blob data and the size of the data.
29
31 This function creates a file in debugfs with the given name that
32 exports blob->data as a binary blob. If the mode variable is so set it
33 can be read from. Writing is not supported.
34
35 This function will return a pointer to a dentry if it succeeds. This
36 pointer must be passed to the debugfs_remove function when the file is
37 to be removed (no automatic cleanup happens if your module is unloaded,
38 you are responsible here.) If an error occurs, NULL will be returned.
39
40 If debugfs is not enabled in the kernel, the value -ENODEV will be
41 returned. It is not wise to check for this value, but rather, check for
42 NULL or !NULL instead as to eliminate the need for #ifdef in the
43 calling code.
44
46Kernel Hackers Manual 3.10 June 2019 DEBUGFS_CREATE_BLOB(9)