---
name: "debugfs_create_symlink"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/debugfs_create_symlink"
---

# debugfs\_create\_symlink(9)

create a symbolic link in the debugfs filesystem

## NAME

debugfs\_create\_symlink - create a symbolic link in the debugfs filesystem

## SYNOPSIS

**struct dentry \* debugfs\_create\_symlink(const char \*** *name***, struct dentry \*** *parent***, const char \*** *target***);**

## ARGUMENTS

*name*

a pointer to a string containing the name of the symbolic link to create.

*parent*

a pointer to the parent dentry for this symbolic link. This should be a directory dentry if set. If this parameter is NULL, then the symbolic link will be created in the root of the debugfs filesystem.

*target*

a pointer to a string containing the path to the target of the symbolic link.

## DESCRIPTION

This function creates a symbolic link with the given name in debugfs that links to the given target path.

This function will return a pointer to a dentry if it succeeds. This pointer must be passed to the **debugfs\_remove** function when the symbolic link is to be removed (no automatic cleanup happens if your module is unloaded, you are responsible here.) If an error occurs, **NULL** will be returned.

If debugfs is not enabled in the kernel, the value -**ENODEV** will be returned.

## COPYRIGHT
