systemd/man/udev_monitor_get_fd.html
2015-06-22 17:16:03 +02:00

44 lines
5.3 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>udev_monitor_receive_device</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
a.headerlink {
color: #c60f0f;
font-size: 0.8em;
padding: 0 4px 0 4px;
text-decoration: none;
visibility: hidden;
}
a.headerlink:hover {
background-color: #c60f0f;
color: white;
}
h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
visibility: visible;
}
</style><a href="index.html">Index </a>·
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<span style="float:right">systemd 221</span><hr><div class="refentry"><a name="udev_monitor_receive_device"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>udev_monitor_receive_device, udev_monitor_enable_receiving, udev_monitor_set_receive_buffer_size, udev_monitor_get_fd, udev_monitor_get_udev — Query and modify device monitor</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;libudev.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">struct udev_device *<b class="fsfunc">udev_monitor_receive_device</b>(</code></td><td>struct udev_monitor *<var class="pdparam">udev_monitor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">udev_monitor_enable_receiving</b>(</code></td><td>struct udev_monitor *<var class="pdparam">udev_monitor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">udev_monitor_set_receive_buffer_size</b>(</code></td><td>struct udev_monitor *<var class="pdparam">udev_monitor</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">udev_monitor_get_fd</b>(</code></td><td>struct udev_monitor *<var class="pdparam">udev_monitor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">struct udev *<b class="fsfunc">udev_monitor_get_udev</b>(</code></td><td>struct udev_monitor *<var class="pdparam">udev_monitor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm47564118973184"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p>On success,
<code class="function">udev_monitor_receive_device()</code> returns a
pointer to a newly referenced device that was received via the
monitor. The caller is responsible to drop this reference when
done. On failure, <code class="constant">NULL</code> is returned.</p><p>On success,
<code class="function">udev_monitor_enable_receiving()</code> and
<code class="function">udev_monitor_set_receive_buffer_size()</code>
return an integer greater than, or equal to,
<code class="constant">0</code>. On failure, a negative error code is
returned.</p><p>On success, <code class="function">udev_monitor_get_fd()</code>
returns the file descriptor used by this monitor. On failure,
a negative error code is returned.</p><p><code class="function">udev_monitor_get_udev()</code> always returns
a pointer to the udev context that this monitor is associated
with.</p></div><div class="refsect1"><a name="idm47564118966816"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="udev_new.html"><span class="citerefentry"><span class="refentrytitle">udev_new</span>(3)</span></a>,
<a href="udev_device_new_from_syspath.html"><span class="citerefentry"><span class="refentrytitle">udev_device_new_from_syspath</span>(3)</span></a>,
<a href="udev_enumerate_new.html"><span class="citerefentry"><span class="refentrytitle">udev_enumerate_new</span>(3)</span></a>,
<a href="udev_monitor_new_from_netlink.html"><span class="citerefentry"><span class="refentrytitle">udev_monitor_new_from_netlink</span>(3)</span></a>,
<a href="udev_monitor_filter_update.html"><span class="citerefentry"><span class="refentrytitle">udev_monitor_filter_update</span>(3)</span></a>,
<a href="udev_list_entry.html"><span class="citerefentry"><span class="refentrytitle">udev_list_entry</span>(3)</span></a>,
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
</p></div></div></body></html>