1SECURITYFS_CREATE_DI(9) Security Framework SECURITYFS_CREATE_DI(9)
2
3
4
6 securityfs_create_dir - create a directory in the securityfs filesystem
7
9 struct dentry * securityfs_create_dir(const char * name,
10 struct dentry * parent);
11
13 name
14 a pointer to a string containing the name of the directory to
15 create.
16
17 parent
18 a pointer to the parent dentry for this file. This should be a
19 directory dentry if set. If this parameter is NULL, then the
20 directory will be created in the root of the securityfs filesystem.
21
23 This function creates a directory in securityfs with the given name.
24
25 This function returns a pointer to a dentry if it succeeds. This
26 pointer must be passed to the securityfs_remove function when the file
27 is to be removed (no automatic cleanup happens if your module is
28 unloaded, you are responsible here). If an error occurs, NULL will be
29 returned.
30
31 If securityfs is not enabled in the kernel, the value -ENODEV is
32 returned. It is not wise to check for this value, but rather, check for
33 NULL or !NULL instead as to eliminate the need for #ifdef in the
34 calling code.
35
37Kernel Hackers Manual 3.10 June 2019 SECURITYFS_CREATE_DI(9)