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

NAME

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

SYNOPSIS

10       struct dentry * debugfs_create_u8(const char * name, mode_t mode,
11                                         struct dentry * parent, u8 * value);
12

ARGUMENTS

14       name
15           a pointer to a string containing the name of the file to create.
16
17       mode
18           the permission that the file should have
19
20       parent
21           a pointer to the parent dentry for this file. This should be a
22           directory dentry if set. If this parameter is NULL, then the file
23           will be created in the root of the debugfs filesystem.
24
25       value
26           a pointer to the variable that the file should read to and write
27           from.
28

DESCRIPTION

30       This function creates a file in debugfs with the given name that
31       contains the value of the variable value. If the mode variable is so
32       set, it can be read from, and written to.
33
34       This function will return a pointer to a dentry if it succeeds. This
35       pointer must be passed to the debugfs_remove function when the file is
36       to be removed (no automatic cleanup happens if your module is unloaded,
37       you are responsible here.) If an error occurs, NULL will be returned.
38
39       If debugfs is not enabled in the kernel, the value -ENODEV will be
40       returned. It is not wise to check for this value, but rather, check for
41       NULL or !NULL instead as to eliminate the need for #ifdef in the
42       calling code.
43
45Kernel Hackers Manual 2.6.         June 2019              DEBUGFS_CREATE_U8(9)
Impressum