man.bsd.lv manual page server

Manual Page Search Parameters

UDEV(3) Library Functions Manual UDEV(3)

udev_new, udev_ref, udev_unref, udev_get_dev_path, udev_set_userdata, udev_get_userdatageneral udev functions

library “libdevattr”

#include <devattr.h>

struct udev *
udev_new(void);

struct udev *
udev_ref(struct udev *udev_ctx);

void
udev_unref(struct udev *udev_ctx);

const char *
udev_get_dev_path(struct udev *udev_ctx);

void
udev_set_userdata(struct udev *udev_ctx, void *userdata);

void *
udev_get_userdata(struct udev *udev_ctx);

The () function returns a new udev context. This is needed as a context for all other libdevattr functions. The returned context has a refcount of 1. This function returns NULL if no udev context could be created, which usually happens when the udevd daemon is not running.

The () and () functions increase or decrease the reference count on a udev object respectively. When the reference count drops to 0, the object is automatically destroyed. The udev_ref() function returns the same object that was passed in.

The () function returns the path to the system device directory.

The () function allows the consumer to associate some userdata to the specified udev_ctx. The () function returns the currently associated user data.

devattr(3), udev_device(3), udev_enumerate(3), udev_monitor(3), udevd(8)

July 11, 2010 DragonFly-5.6.1