summaryrefslogtreecommitdiff
path: root/static/freebsd/man9/dev_clone.9 4.html
diff options
context:
space:
mode:
Diffstat (limited to 'static/freebsd/man9/dev_clone.9 4.html')
-rw-r--r--static/freebsd/man9/dev_clone.9 4.html67
1 files changed, 67 insertions, 0 deletions
diff --git a/static/freebsd/man9/dev_clone.9 4.html b/static/freebsd/man9/dev_clone.9 4.html
new file mode 100644
index 00000000..f978b0e0
--- /dev/null
+++ b/static/freebsd/man9/dev_clone.9 4.html
@@ -0,0 +1,67 @@
+<table class="head">
+ <tr>
+ <td class="head-ltitle">DEV_CLONE(9)</td>
+ <td class="head-vol">Kernel Developer's Manual</td>
+ <td class="head-rtitle">DEV_CLONE(9)</td>
+ </tr>
+</table>
+<div class="manual-text">
+<section class="Sh">
+<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
+<p class="Pp"><code class="Nm">dev_clone</code>,
+ <code class="Nm">drain_dev_clone_events</code> &#x2014;
+ <span class="Nd">eventhandler for name-based device cloning in
+ devfs</span></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
+<p class="Pp"><code class="In">#include
+ &lt;<a class="In">sys/param.h</a>&gt;</code>
+ <br/>
+ <code class="In">#include &lt;<a class="In">sys/conf.h</a>&gt;</code></p>
+<p class="Pp"><var class="Ft">void</var>
+ <br/>
+ <code class="Fn">clone_handler</code>(<var class="Fa" style="white-space: nowrap;">void
+ *arg</var>, <var class="Fa" style="white-space: nowrap;">struct ucred
+ *cr</var>, <var class="Fa" style="white-space: nowrap;">char *name</var>,
+ <var class="Fa" style="white-space: nowrap;">int namelen</var>,
+ <var class="Fa" style="white-space: nowrap;">struct cdev **dev</var>);</p>
+<div class="Bd Pp Li">
+<pre>EVENTHANDLER_REGISTER(dev_clone, clone_handler, arg, priority);</pre>
+</div>
+<br/>
+<var class="Ft">void</var>
+<br/>
+<code class="Fn">drain_dev_clone_events</code>();
+</section>
+<section class="Sh">
+<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
+<p class="Pp">A device driver may register a listener that will be notified each
+ time a name lookup on the <a class="Xr">devfs(4)</a> mount point fails to
+ find the vnode. A listener shall be registered for the
+ <var class="Va">dev_clone</var> event. When called, it is supplied with the
+ first argument <var class="Va">arg</var> that was specified at handler
+ registration time, appropriate credentials <var class="Va">cr</var>, and a
+ name <var class="Va">name</var> of length <var class="Va">namelen</var> that
+ we look for. If the handler decides that the name is appropriate and wants
+ to create the device that will be associated with the name, it should return
+ it to devfs in the <var class="Va">dev</var> argument.</p>
+<p class="Pp" id="drain_dev_clone_events">The
+ <a class="permalink" href="#drain_dev_clone_events"><code class="Fn">drain_dev_clone_events</code></a>()
+ function is a barrier. It is guaranteed that all calls to eventhandlers for
+ <code class="Nm">dev_clone</code> that were started before
+ <code class="Fn">drain_dev_clone_events</code>() call, are finished before
+ it returns control.</p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
+ ALSO</a></h1>
+<p class="Pp"><a class="Xr">devfs(4)</a>, <a class="Xr">namei(9)</a></p>
+</section>
+</div>
+<table class="foot">
+ <tr>
+ <td class="foot-date">January 3, 2009</td>
+ <td class="foot-os">FreeBSD 15.0</td>
+ </tr>
+</table>