summaryrefslogtreecommitdiffstats
path: root/upstream/archlinux/man3/libudev.3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:43:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:43:11 +0000
commitfc22b3d6507c6745911b9dfcc68f1e665ae13dbc (patch)
treece1e3bce06471410239a6f41282e328770aa404a /upstream/archlinux/man3/libudev.3
parentInitial commit. (diff)
downloadmanpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.tar.xz
manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.zip
Adding upstream version 4.22.0.upstream/4.22.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/archlinux/man3/libudev.3')
-rw-r--r--upstream/archlinux/man3/libudev.383
1 files changed, 83 insertions, 0 deletions
diff --git a/upstream/archlinux/man3/libudev.3 b/upstream/archlinux/man3/libudev.3
new file mode 100644
index 00000000..ebc82bdb
--- /dev/null
+++ b/upstream/archlinux/man3/libudev.3
@@ -0,0 +1,83 @@
+'\" t
+.TH "LIBUDEV" "3" "" "systemd 255" "libudev"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+libudev \- API for enumerating and introspecting local devices
+.SH "SYNOPSIS"
+.sp
+.ft B
+.nf
+#include <libudev\&.h>
+.fi
+.ft
+.HP \w'\fBpkg\-config\ \-\-cflags\ \-\-libs\ libudev\fR\ 'u
+\fBpkg\-config \-\-cflags \-\-libs libudev\fR
+.SH "DESCRIPTION"
+.PP
+libudev\&.h
+provides an API to introspect and enumerate devices on the local system\&. This library is supported, but should not be used in new projects\&. Please see
+\fBsd-device\fR(3)
+for an equivalent replacement with a more modern API\&.
+.PP
+All functions require a libudev context to operate\&. This context can be created via
+\fBudev_new\fR(3)\&. It is used to track library state and link objects together\&. No global state is used by libudev, everything is always linked to a udev context\&.
+.PP
+All functions listed here are thread\-agnostic and only a single specific thread may operate on a given object during its entire lifetime\&. It\*(Aqs safe to allocate multiple independent objects and use each from a specific thread in parallel\&. However, it\*(Aqs not safe to allocate such an object in one thread, and operate or free it from any other, even if locking is used to ensure these threads don\*(Aqt operate on it at the very same time\&.
+.PP
+The code described here uses
+\fBgetenv\fR(3), which is declared to be not multi\-thread\-safe\&. This means that the code calling the functions described here must not call
+\fBsetenv\fR(3)
+from a parallel thread\&. It is recommended to only do calls to
+\fBsetenv()\fR
+from an early phase of the program when no other threads have been started\&.
+.PP
+To introspect a local device on a system, a udev device object can be created via
+\fBudev_device_new_from_syspath\fR(3)
+and friends\&. The device object allows one to query current state, read and write attributes and lookup properties of the device in question\&.
+.PP
+To enumerate local devices on the system, an enumeration object can be created via
+\fBudev_enumerate_new\fR(3)\&.
+.PP
+To monitor the local system for hotplugged or unplugged devices, a monitor can be created via
+\fBudev_monitor_new_from_netlink\fR(3)\&.
+.PP
+Whenever libudev returns a list of objects, the
+\fBudev_list_entry\fR(3)
+API should be used to iterate, access and modify those lists\&.
+.PP
+Furthermore, libudev also exports legacy APIs that should not be used by new software (and as such are not documented as part of this manual)\&. This includes the hardware database known as
+\fBudev_hwdb\fR
+(please use the new
+\fBsd-hwdb\fR(3)
+API instead) and the
+\fBudev_queue\fR
+object to query the udev daemon (which should not be used by new software at all)\&.
+.SH "SEE ALSO"
+.PP
+\fBudev_new\fR(3),
+\fBudev_device_new_from_syspath\fR(3),
+\fBudev_enumerate_new\fR(3),
+\fBudev_monitor_new_from_netlink\fR(3),
+\fBudev_list_entry\fR(3),
+\fBsystemd\fR(1),
+\fBsd-device\fR(3),
+\fBsd-hwdb\fR(3),
+\fBpkg-config\fR(1)