1UDEV_NEW(3)                        udev_new                        UDEV_NEW(3)
2
3
4

NAME

6       udev_new, udev_ref, udev_unref - Create, acquire and release a udev
7       context object
8

SYNOPSIS

10       #include <libudev.h>
11
12       struct udev *udev_new(void);
13
14       struct udev *udev_ref(struct udev *udev);
15
16       struct udev *udev_unref(struct udev *udev);
17

DESCRIPTION

19       udev_new() allocates a new udev context object and returns a pointer to
20       it. This object is opaque and must not be accessed by the caller via
21       different means than functions provided by libudev. Initially, the
22       reference count of the context is 1. You can acquire further
23       references, and drop gained references via udev_ref() and udev_unref().
24       Once the reference count hits 0, the context object is destroyed and
25       freed.
26

RETURN VALUE

28       On success, udev_new() returns a pointer to the allocated udev context.
29       On failure, NULL is returned.  udev_ref() returns the argument that it
30       was passed, unmodified.  udev_unref() always returns NULL.
31

SEE ALSO

33       systemd(1),
34
35
36
37systemd 250                                                        UDEV_NEW(3)
Impressum