1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>debugfs_rename</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Filesystems API"><link rel="up" href="debugfs.html#debugfs_interface" title="debugfs interface"><link rel="prev" href="API-debugfs-remove-recursive.html" title="debugfs_remove_recursive"><link rel="next" href="API-debugfs-initialized.html" title="debugfs_initialized"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">debugfs_rename</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-debugfs-remove-recursive.html">Prev</a>&#160;</td><th width="60%" align="center">debugfs interface</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-debugfs-initialized.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-debugfs-rename"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>debugfs_rename &#8212; 
2     rename a file/directory in the debugfs filesystem
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">struct dentry * <b class="fsfunc">debugfs_rename </b>(</code></td><td>struct dentry * <var class="pdparam">old_dir</var>, </td></tr><tr><td>&#160;</td><td>struct dentry * <var class="pdparam">old_dentry</var>, </td></tr><tr><td>&#160;</td><td>struct dentry * <var class="pdparam">new_dir</var>, </td></tr><tr><td>&#160;</td><td>const char * <var class="pdparam">new_name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1103363844"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>old_dir</code></em></span></dt><dd><p>
4     a pointer to the parent dentry for the renamed object. This
5     should be a directory dentry.
6    </p></dd><dt><span class="term"><em class="parameter"><code>old_dentry</code></em></span></dt><dd><p>
7     dentry of an object to be renamed.
8    </p></dd><dt><span class="term"><em class="parameter"><code>new_dir</code></em></span></dt><dd><p>
9     a pointer to the parent dentry where the object should be
10     moved. This should be a directory dentry.
11    </p></dd><dt><span class="term"><em class="parameter"><code>new_name</code></em></span></dt><dd><p>
12     a pointer to a string containing the target name.
13    </p></dd></dl></div></div><div class="refsect1"><a name="idp1103368732"></a><h2>Description</h2><p>
14   This function renames a file/directory in debugfs.  The target must not
15   exist for rename to succeed.
16   </p><p>
17
18   This function will return a pointer to old_dentry (which is updated to
19   reflect renaming) if it succeeds. If an error occurs, <code class="constant">NULL</code> will be
20   returned.
21   </p><p>
22
23   If debugfs is not enabled in the kernel, the value -<code class="constant">ENODEV</code> will be
24   returned.
25</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-debugfs-remove-recursive.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="debugfs.html#debugfs_interface">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-debugfs-initialized.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">debugfs_remove_recursive</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">debugfs_initialized</span></td></tr></table></div></body></html>
26