summaryrefslogtreecommitdiff
path: root/man/udev_device_get_devnum.html
blob: ce28af49945d43893e94e5c3ce963a933d1f4142 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>udev_device_get_syspath</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_device_get_syspath"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>udev_device_get_syspath, udev_device_get_sysname, udev_device_get_sysnum, udev_device_get_devpath, udev_device_get_devnode, udev_device_get_devnum, udev_device_get_devtype, udev_device_get_subsystem, udev_device_get_driver, udev_device_get_udev, udev_device_get_parent, udev_device_get_parent_with_subsystem_devtype, udev_device_get_is_initialized, udev_device_get_action — Query device properties</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">const char *<b class="fsfunc">udev_device_get_syspath</b>(</code></td><td>struct udev_device *<var class="pdparam">udev_device</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">const char *<b class="fsfunc">udev_device_get_sysname</b>(</code></td><td>struct udev_device *<var class="pdparam">udev_device</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">const char *<b class="fsfunc">udev_device_get_sysnum</b>(</code></td><td>struct udev_device *<var class="pdparam">udev_device</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">const char *<b class="fsfunc">udev_device_get_devpath</b>(</code></td><td>struct udev_device *<var class="pdparam">udev_device</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">const char *<b class="fsfunc">udev_device_get_devnode</b>(</code></td><td>struct udev_device *<var class="pdparam">udev_device</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">dev_t <b class="fsfunc">udev_device_get_devnum</b>(</code></td><td>struct udev_device *<var class="pdparam">udev_device</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">const char *<b class="fsfunc">udev_device_get_devtype</b>(</code></td><td>struct udev_device *<var class="pdparam">udev_device</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">const char *<b class="fsfunc">udev_device_get_subsystem</b>(</code></td><td>struct udev_device *<var class="pdparam">udev_device</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">const char *<b class="fsfunc">udev_device_get_driver</b>(</code></td><td>struct udev_device *<var class="pdparam">udev_device</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_device_get_udev</b>(</code></td><td>struct udev_device *<var class="pdparam">udev_device</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_device *<b class="fsfunc">udev_device_get_parent</b>(</code></td><td>struct udev_device *<var class="pdparam">udev_device</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_device *<b class="fsfunc">udev_device_get_parent_with_subsystem_devtype</b>(</code></td><td>struct udev_device *<var class="pdparam">udev_device</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_device_get_is_initialized</b>(</code></td><td>struct udev_device *<var class="pdparam">udev_device</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">const char *<b class="fsfunc">udev_device_get_action</b>(</code></td><td>struct udev_device *<var class="pdparam">udev_device</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">subsystem</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">devtype</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm47946580481136"></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_device_get_syspath()</code>,
    <code class="function">udev_device_get_sysname()</code>,
    <code class="function">udev_device_get_sysnum()</code>,
    <code class="function">udev_device_get_devpath()</code>,
    <code class="function">udev_device_get_devnode()</code>,
    <code class="function">udev_device_get_devtype()</code>,
    <code class="function">udev_device_get_subsystem()</code>,
    <code class="function">udev_device_get_driver()</code> and
    <code class="function">udev_device_get_action()</code> return a pointer
    to a constant string that describes the requested property. The
    lifetime of this string is bound to the device it was requested
    on. On failure, each function may return
    <code class="constant">NULL</code>.</p><p>On success, <code class="function">udev_device_get_devnum()</code>
    returns the device type of the passed device. On failure, a
    device type with minor and major number set to
    <code class="constant">0</code> is returned.</p><p><code class="function">udev_device_get_udev()</code> always returns
    a valid pointer to the udev context that this device belongs
    to.</p><p>On success, <code class="function">udev_device_get_parent()</code>
    and
    <code class="function">udev_device_get_parent_with_subsystem_devtype()</code>
    return a pointer to the parent device. No additional reference
    to this device is acquired, but the child device owns a reference
    to such parent device. On failure, <code class="constant">NULL</code>
    is returned.</p><p>On success, <code class="function">udev_device_get_is_initialized()</code>
    returns either <code class="constant">1</code> or <code class="constant">0</code>,
    depending on whether the passed device is initialized or not. On
    failure, a negative error code is returned.</p></div><div class="refsect1"><a name="idm47946580467232"></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_device_has_tag.html"><span class="citerefentry"><span class="refentrytitle">udev_device_has_tag</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_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>