1DEBUGFS_CREATE_U32(9)       The debugfs filesystem       DEBUGFS_CREATE_U32(9)
2
3
4

NAME

6       debugfs_create_u32 - create a debugfs file that is used to read and
7       write an unsigned 32-bit value
8

SYNOPSIS

10       struct dentry * debugfs_create_u32(const char * name, mode_t mode,
11                                          struct dentry * parent,
12                                          u32 * value);
13

ARGUMENTS

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       value
27           a pointer to the variable that the file should read to and write
28           from.
29

DESCRIPTION

31       This function creates a file in debugfs with the given name that
32       contains the value of the variable value. If the mode variable is so
33       set, it can be read from, and written to.
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 2.6.         June 2019             DEBUGFS_CREATE_U32(9)
Impressum