diff --git a/packages.ent b/packages.ent index a29bdcbd8..ff6021c0f 100644 --- a/packages.ent +++ b/packages.ent @@ -543,10 +543,10 @@ - - + + - + diff --git a/udev-lfs/Makefile.lfs b/udev-lfs/Makefile.lfs index 2dc6f83c6..7f9f30bf4 100644 --- a/udev-lfs/Makefile.lfs +++ b/udev-lfs/Makefile.lfs @@ -5,7 +5,7 @@ SHELL=/bin/bash SYSTEMD_VERSION=199 -VERSION=199-1 +VERSION=199-2 ifeq ($(V),) VB = @ @@ -310,8 +310,8 @@ install: udev # @build/udevadm hwdb --update # Copy documentation - @cp -v man/udev.7 $(DESTDIR)/usr/share/man/man7 - @cp -v man/udevadm.8 $(DESTDIR)/usr/share/man/man8 + @cp -v udev-lfs-$(VERSION)/udev.7 $(DESTDIR)/usr/share/man/man7 + @cp -v udev-lfs-$(VERSION)/udevadm.8 $(DESTDIR)/usr/share/man/man8 @cp -v udev-lfs-$(VERSION)/udevd.8 $(DESTDIR)/usr/share/man/man8 @cp -v udev-lfs-$(VERSION)/README $(DESTDIR)/usr/share/doc/udev/lfs @cp -v udev-lfs-$(VERSION)/*.txt $(DESTDIR)/usr/share/doc/udev/lfs diff --git a/udev-lfs/gudev/GUdevClient.html b/udev-lfs/gudev/GUdevClient.html new file mode 100644 index 000000000..c50304404 --- /dev/null +++ b/udev-lfs/gudev/GUdevClient.html @@ -0,0 +1,467 @@ + + + + +GUdevClient + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GUdevClient

+

GUdevClient — Query devices and listen to uevents

+
+
+

Synopsis

+
                    GUdevClient;
+struct              GUdevClientClass;
+enum                GUdevDeviceType;
+typedef             GUdevDeviceNumber;
+GUdevClient *       g_udev_client_new                   (const gchar * const *subsystems);
+GList *             g_udev_client_query_by_subsystem    (GUdevClient *client,
+                                                         const gchar *subsystem);
+GUdevDevice *       g_udev_client_query_by_device_number
+                                                        (GUdevClient *client,
+                                                         GUdevDeviceType type,
+                                                         GUdevDeviceNumber number);
+GUdevDevice *       g_udev_client_query_by_device_file  (GUdevClient *client,
+                                                         const gchar *device_file);
+GUdevDevice *       g_udev_client_query_by_sysfs_path   (GUdevClient *client,
+                                                         const gchar *sysfs_path);
+GUdevDevice *       g_udev_client_query_by_subsystem_and_name
+                                                        (GUdevClient *client,
+                                                         const gchar *subsystem,
+                                                         const gchar *name);
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----GUdevClient
+
+
+  GEnum
+   +----GUdevDeviceType
+
+
+
+

Properties

+
+  "subsystems"               GStrv                 : Read / Write / Construct Only
+
+
+
+

Signals

+
+  "uevent"                                         : Run Last
+
+
+
+

Description

+

+GUdevClient is used to query information about devices on a Linux +system from the Linux kernel and the udev device +manager. +

+

+Device information is retrieved from the kernel (through the +sysfs filesystem) and the udev daemon (through a +tmpfs filesystem) and presented through +GUdevDevice objects. This means that no blocking IO ever happens +(in both cases, we are essentially just reading data from kernel +memory) and as such there are no asynchronous versions of the +provided methods. +

+

+To get GUdevDevice objects, use +g_udev_client_query_by_subsystem(), +g_udev_client_query_by_device_number(), +g_udev_client_query_by_device_file(), +g_udev_client_query_by_sysfs_path(), +g_udev_client_query_by_subsystem_and_name() +or the GUdevEnumerator type. +

+

+To listen to uevents, connect to the "uevent" signal. +

+
+
+

Details

+
+

GUdevClient

+
typedef struct _GUdevClient GUdevClient;
+

+The GUdevClient struct is opaque and should not be accessed directly. +

+
+
+
+

struct GUdevClientClass

+
struct GUdevClientClass {
+  GObjectClass   parent_class;
+
+  /* signals */
+  void (*uevent) (GUdevClient  *client,
+                  const gchar  *action,
+                  GUdevDevice  *device);
+};
+
+

+Class structure for GUdevClient. +

+
++++ + + + + + + + + + + +

GObjectClass parent_class;

Parent class.

uevent ()

Signal class handler for the "uevent" signal.
+
+
+
+

enum GUdevDeviceType

+
typedef enum {
+  G_UDEV_DEVICE_TYPE_NONE = 0,
+  G_UDEV_DEVICE_TYPE_BLOCK = 'b',
+  G_UDEV_DEVICE_TYPE_CHAR = 'c',
+} GUdevDeviceType;
+
+

+Enumeration used to specify a the type of a device. +

+
++++ + + + + + + + + + + + + + + +

G_UDEV_DEVICE_TYPE_NONE

Device does not have a device file. +

G_UDEV_DEVICE_TYPE_BLOCK

Device is a block device. +

G_UDEV_DEVICE_TYPE_CHAR

Device is a character device. +
+
+
+
+

GUdevDeviceNumber

+
typedef guint64 GUdevDeviceNumber; /* __UQUAD_TYPE */
+
+

+Corresponds to the standard dev_t type as defined by POSIX (Until +bug 584517 is resolved this work-around is needed). +

+
+
+
+

g_udev_client_new ()

+
GUdevClient *       g_udev_client_new                   (const gchar * const *subsystems);
+

+Constructs a GUdevClient object that can be used to query +information about devices. Connect to the "uevent" +signal to listen for uevents. Note that signals are emitted in the +thread-default main loop +of the thread that you call this constructor from. +

+
++++ + + + + + + + + + + +

subsystems :

A NULL terminated string array of subsystems to listen for uevents on, NULL to not listen on uevents at all, or an empty array to listen to uevents on all subsystems. See the documentation for the "subsystems" property for details on this parameter. [array zero-terminated=1][element-type utf8][transfer none][allow-none] +

Returns :

A new GUdevClient object. Free with g_object_unref().
+
+
+
+

g_udev_client_query_by_subsystem ()

+
GList *             g_udev_client_query_by_subsystem    (GUdevClient *client,
+                                                         const gchar *subsystem);
+

+Gets all devices belonging to subsystem. +

+
++++ + + + + + + + + + + + + + + +

client :

A GUdevClient.

subsystem :

The subsystem to get devices for or NULL to get all devices. [allow-none] +

Returns :

A list of GUdevDevice objects. The caller should free the result by using g_object_unref() on each element in the list and then g_list_free() on the list. [element-type GUdevDevice][transfer full] +
+
+
+
+

g_udev_client_query_by_device_number ()

+
GUdevDevice *       g_udev_client_query_by_device_number
+                                                        (GUdevClient *client,
+                                                         GUdevDeviceType type,
+                                                         GUdevDeviceNumber number);
+

+Looks up a device for a type and device number. +

+
++++ + + + + + + + + + + + + + + + + + + +

client :

A GUdevClient.

type :

A value from the GUdevDeviceType enumeration.

number :

A device number.

Returns :

A GUdevDevice object or NULL if the device was not found. Free with g_object_unref(). [transfer full] +
+
+
+
+

g_udev_client_query_by_device_file ()

+
GUdevDevice *       g_udev_client_query_by_device_file  (GUdevClient *client,
+                                                         const gchar *device_file);
+

+Looks up a device for a device file. +

+
++++ + + + + + + + + + + + + + + +

client :

A GUdevClient.

device_file :

A device file.

Returns :

A GUdevDevice object or NULL if the device was not found. Free with g_object_unref(). [transfer full] +
+
+
+
+

g_udev_client_query_by_sysfs_path ()

+
GUdevDevice *       g_udev_client_query_by_sysfs_path   (GUdevClient *client,
+                                                         const gchar *sysfs_path);
+

+Looks up a device for a sysfs path. +

+
++++ + + + + + + + + + + + + + + +

client :

A GUdevClient.

sysfs_path :

A sysfs path.

Returns :

A GUdevDevice object or NULL if the device was not found. Free with g_object_unref(). [transfer full] +
+
+
+
+

g_udev_client_query_by_subsystem_and_name ()

+
GUdevDevice *       g_udev_client_query_by_subsystem_and_name
+                                                        (GUdevClient *client,
+                                                         const gchar *subsystem,
+                                                         const gchar *name);
+

+Looks up a device for a subsystem and name. +

+
++++ + + + + + + + + + + + + + + + + + + +

client :

A GUdevClient.

subsystem :

A subsystem name.

name :

The name of the device.

Returns :

A GUdevDevice object or NULL if the device was not found. Free with g_object_unref(). [transfer full] +
+
+
+
+

Property Details

+
+

The "subsystems" property

+
  "subsystems"               GStrv                 : Read / Write / Construct Only
+

+The subsystems to listen for uevents on. +

+

+To listen for only a specific DEVTYPE for a given SUBSYSTEM, use +"subsystem/devtype". For example, to only listen for uevents +where SUBSYSTEM is usb and DEVTYPE is usb_interface, use +"usb/usb_interface". +

+

+If this property is NULL, then no events will be reported. If +it's the empty array, events from all subsystems will be +reported. +

+
+
+
+

Signal Details

+
+

The "uevent" signal

+
void                user_function                      (GUdevClient *client,
+                                                        gchar       *action,
+                                                        GUdevDevice *device,
+                                                        gpointer     user_data)      : Run Last
+

+Emitted when client receives an uevent. +

+

+This signal is emitted in the +thread-default main loop +of the thread that client was created in. +

+
++++ + + + + + + + + + + + + + + + + + + +

client :

The GUdevClient receiving the event.

action :

The action for the uevent e.g. "add", "remove", "change", "move", etc.

device :

Details about the GUdevDevice the event is for.

user_data :

user data set when the signal handler was connected.
+
+
+
+ + + \ No newline at end of file diff --git a/udev-lfs/gudev/GUdevDevice.html b/udev-lfs/gudev/GUdevDevice.html new file mode 100644 index 000000000..a2fb8987b --- /dev/null +++ b/udev-lfs/gudev/GUdevDevice.html @@ -0,0 +1,1077 @@ + + + + +GUdevDevice + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GUdevDevice

+

GUdevDevice — Get information about a device

+
+
+

Synopsis

+
                    GUdevDevice;
+struct              GUdevDeviceClass;
+const gchar *       g_udev_device_get_subsystem         (GUdevDevice *device);
+const gchar *       g_udev_device_get_devtype           (GUdevDevice *device);
+const gchar *       g_udev_device_get_name              (GUdevDevice *device);
+const gchar *       g_udev_device_get_number            (GUdevDevice *device);
+const gchar *       g_udev_device_get_sysfs_path        (GUdevDevice *device);
+const gchar *       g_udev_device_get_driver            (GUdevDevice *device);
+const gchar *       g_udev_device_get_action            (GUdevDevice *device);
+guint64             g_udev_device_get_seqnum            (GUdevDevice *device);
+GUdevDeviceType     g_udev_device_get_device_type       (GUdevDevice *device);
+GUdevDeviceNumber   g_udev_device_get_device_number     (GUdevDevice *device);
+const gchar *       g_udev_device_get_device_file       (GUdevDevice *device);
+const gchar * const * g_udev_device_get_device_file_symlinks
+                                                        (GUdevDevice *device);
+GUdevDevice *       g_udev_device_get_parent            (GUdevDevice *device);
+GUdevDevice *       g_udev_device_get_parent_with_subsystem
+                                                        (GUdevDevice *device,
+                                                         const gchar *subsystem,
+                                                         const gchar *devtype);
+const gchar * const * g_udev_device_get_tags            (GUdevDevice *device);
+gboolean            g_udev_device_get_is_initialized    (GUdevDevice *device);
+guint64             g_udev_device_get_usec_since_initialized
+                                                        (GUdevDevice *device);
+const gchar * const * g_udev_device_get_property_keys   (GUdevDevice *device);
+gboolean            g_udev_device_has_property          (GUdevDevice *device,
+                                                         const gchar *key);
+const gchar *       g_udev_device_get_property          (GUdevDevice *device,
+                                                         const gchar *key);
+gint                g_udev_device_get_property_as_int   (GUdevDevice *device,
+                                                         const gchar *key);
+guint64             g_udev_device_get_property_as_uint64
+                                                        (GUdevDevice *device,
+                                                         const gchar *key);
+gdouble             g_udev_device_get_property_as_double
+                                                        (GUdevDevice *device,
+                                                         const gchar *key);
+gboolean            g_udev_device_get_property_as_boolean
+                                                        (GUdevDevice *device,
+                                                         const gchar *key);
+const gchar * const * g_udev_device_get_property_as_strv
+                                                        (GUdevDevice *device,
+                                                         const gchar *key);
+const gchar *       g_udev_device_get_sysfs_attr        (GUdevDevice *device,
+                                                         const gchar *name);
+gint                g_udev_device_get_sysfs_attr_as_int (GUdevDevice *device,
+                                                         const gchar *name);
+guint64             g_udev_device_get_sysfs_attr_as_uint64
+                                                        (GUdevDevice *device,
+                                                         const gchar *name);
+gdouble             g_udev_device_get_sysfs_attr_as_double
+                                                        (GUdevDevice *device,
+                                                         const gchar *name);
+gboolean            g_udev_device_get_sysfs_attr_as_boolean
+                                                        (GUdevDevice *device,
+                                                         const gchar *name);
+const gchar * const * g_udev_device_get_sysfs_attr_as_strv
+                                                        (GUdevDevice *device,
+                                                         const gchar *name);
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----GUdevDevice
+
+
+
+

Description

+

+The GUdevDevice class is used to get information about a specific +device. Note that you cannot instantiate a GUdevDevice object +yourself. Instead you must use GUdevClient to obtain GUdevDevice +objects. +

+

+To get basic information about a device, use +g_udev_device_get_subsystem(), g_udev_device_get_devtype(), +g_udev_device_get_name(), g_udev_device_get_number(), +g_udev_device_get_sysfs_path(), g_udev_device_get_driver(), +g_udev_device_get_action(), g_udev_device_get_seqnum(), +g_udev_device_get_device_type(), g_udev_device_get_device_number(), +g_udev_device_get_device_file(), +g_udev_device_get_device_file_symlinks(). +

+

+To navigate the device tree, use g_udev_device_get_parent() and +g_udev_device_get_parent_with_subsystem(). +

+

+To access udev properties for the device, use +g_udev_device_get_property_keys(), +g_udev_device_has_property(), +g_udev_device_get_property(), +g_udev_device_get_property_as_int(), +g_udev_device_get_property_as_uint64(), +g_udev_device_get_property_as_double(), +g_udev_device_get_property_as_boolean() and +g_udev_device_get_property_as_strv(). +

+

+To access sysfs attributes for the device, use +g_udev_device_get_sysfs_attr(), +g_udev_device_get_sysfs_attr_as_int(), +g_udev_device_get_sysfs_attr_as_uint64(), +g_udev_device_get_sysfs_attr_as_double(), +g_udev_device_get_sysfs_attr_as_boolean() and +g_udev_device_get_sysfs_attr_as_strv(). +

+

+Note that all getters on GUdevDevice are non-reffing – returned +values are owned by the object, should not be freed and are only +valid as long as the object is alive. +

+

+By design, GUdevDevice will not react to changes for a device – it +only contains a snapshot of information when the GUdevDevice +object was created. To work with changes, you typically connect to +the "uevent" signal on a GUdevClient and get a new +GUdevDevice whenever an event happens. +

+
+
+

Details

+
+

GUdevDevice

+
typedef struct _GUdevDevice GUdevDevice;
+

+The GUdevDevice struct is opaque and should not be accessed directly. +

+
+
+
+

struct GUdevDeviceClass

+
struct GUdevDeviceClass {
+  GObjectClass parent_class;
+};
+
+

+Class structure for GUdevDevice. +

+
++++ + + + + +

GObjectClass parent_class;

Parent class.
+
+
+
+

g_udev_device_get_subsystem ()

+
const gchar *       g_udev_device_get_subsystem         (GUdevDevice *device);
+

+Gets the subsystem for device. +

+
++++ + + + + + + + + + + +

device :

A GUdevDevice.

Returns :

The subsystem for device.
+
+
+
+

g_udev_device_get_devtype ()

+
const gchar *       g_udev_device_get_devtype           (GUdevDevice *device);
+

+Gets the device type for device. +

+
++++ + + + + + + + + + + +

device :

A GUdevDevice.

Returns :

The devtype for device.
+
+
+
+

g_udev_device_get_name ()

+
const gchar *       g_udev_device_get_name              (GUdevDevice *device);
+

+Gets the name of device, e.g. "sda3". +

+
++++ + + + + + + + + + + +

device :

A GUdevDevice.

Returns :

The name of device.
+
+
+
+

g_udev_device_get_number ()

+
const gchar *       g_udev_device_get_number            (GUdevDevice *device);
+

+Gets the number of device, e.g. "3" if g_udev_device_get_name() returns "sda3". +

+
++++ + + + + + + + + + + +

device :

A GUdevDevice.

Returns :

The number of device.
+
+
+
+

g_udev_device_get_sysfs_path ()

+
const gchar *       g_udev_device_get_sysfs_path        (GUdevDevice *device);
+

+Gets the sysfs path for device. +

+
++++ + + + + + + + + + + +

device :

A GUdevDevice.

Returns :

The sysfs path for device.
+
+
+
+

g_udev_device_get_driver ()

+
const gchar *       g_udev_device_get_driver            (GUdevDevice *device);
+

+Gets the name of the driver used for device. +

+
++++ + + + + + + + + + + +

device :

A GUdevDevice.

Returns :

The name of the driver for device or NULL if unknown.
+
+
+
+

g_udev_device_get_action ()

+
const gchar *       g_udev_device_get_action            (GUdevDevice *device);
+

+Gets the most recent action (e.g. "add", "remove", "change", etc.) for device. +

+
++++ + + + + + + + + + + +

device :

A GUdevDevice.

Returns :

An action string.
+
+
+
+

g_udev_device_get_seqnum ()

+
guint64             g_udev_device_get_seqnum            (GUdevDevice *device);
+

+Gets the most recent sequence number for device. +

+
++++ + + + + + + + + + + +

device :

A GUdevDevice.

Returns :

A sequence number.
+
+
+
+

g_udev_device_get_device_type ()

+
GUdevDeviceType     g_udev_device_get_device_type       (GUdevDevice *device);
+

+Gets the type of the device file, if any, for device. +

+
++++ + + + + + + + + + + +

device :

A GUdevDevice.

Returns :

The device number for device or G_UDEV_DEVICE_TYPE_NONE if the device does not have a device file.
+
+
+
+

g_udev_device_get_device_number ()

+
GUdevDeviceNumber   g_udev_device_get_device_number     (GUdevDevice *device);
+

+Gets the device number, if any, for device. +

+
++++ + + + + + + + + + + +

device :

A GUdevDevice.

Returns :

The device number for device or 0 if unknown.
+
+
+
+

g_udev_device_get_device_file ()

+
const gchar *       g_udev_device_get_device_file       (GUdevDevice *device);
+

+Gets the device file for device. +

+
++++ + + + + + + + + + + +

device :

A GUdevDevice.

Returns :

The device file for device or NULL if no device file +exists.
+
+
+
+

g_udev_device_get_device_file_symlinks ()

+
const gchar * const * g_udev_device_get_device_file_symlinks
+                                                        (GUdevDevice *device);
+

+Gets a list of symlinks (in /dev) that points to +the device file for device. +

+
++++ + + + + + + + + + + +

device :

A GUdevDevice.

Returns :

A NULL terminated string array of symlinks. This array is owned by device and should not be freed by the caller. [transfer none][array zero-terminated=1][element-type utf8] +
+
+
+
+

g_udev_device_get_parent ()

+
GUdevDevice *       g_udev_device_get_parent            (GUdevDevice *device);
+

+Gets the immediate parent of device, if any. +

+
++++ + + + + + + + + + + +

device :

A GUdevDevice.

Returns :

A GUdevDevice or NULL if device has no parent. Free with g_object_unref(). [transfer full] +
+
+
+
+

g_udev_device_get_parent_with_subsystem ()

+
GUdevDevice *       g_udev_device_get_parent_with_subsystem
+                                                        (GUdevDevice *device,
+                                                         const gchar *subsystem,
+                                                         const gchar *devtype);
+

+Walks up the chain of parents of device and returns the first +device encountered where subsystem and devtype matches, if any. +

+
++++ + + + + + + + + + + + + + + + + + + +

device :

A GUdevDevice.

subsystem :

The subsystem of the parent to get.

devtype :

The devtype of the parent to get or NULL. [allow-none] +

Returns :

A GUdevDevice or NULL if device has no parent with subsystem and devtype. Free with g_object_unref(). [transfer full] +
+
+
+
+

g_udev_device_get_tags ()

+
const gchar * const * g_udev_device_get_tags            (GUdevDevice *device);
+

+Gets all tags for device. +

+
++++ + + + + + + + + + + +

device :

A GUdevDevice.

Returns :

A NULL terminated string array of tags. This array is owned by device and should not be freed by the caller. [transfer none][array zero-terminated=1][element-type utf8] +
+

Since 165

+
+
+
+

g_udev_device_get_is_initialized ()

+
gboolean            g_udev_device_get_is_initialized    (GUdevDevice *device);
+

+Gets whether device has been initalized. +

+
++++ + + + + + + + + + + +

device :

A GUdevDevice.

Returns :

Whether device has been initialized.
+

Since 165

+
+
+
+

g_udev_device_get_usec_since_initialized ()

+
guint64             g_udev_device_get_usec_since_initialized
+                                                        (GUdevDevice *device);
+

+Gets number of micro-seconds since device was initialized. +

+

+This only works for devices with properties in the udev +database. All other devices return 0. +

+
++++ + + + + + + + + + + +

device :

A GUdevDevice.

Returns :

Number of micro-seconds since device was initialized or 0 if unknown.
+

Since 165

+
+
+
+

g_udev_device_get_property_keys ()

+
const gchar * const * g_udev_device_get_property_keys   (GUdevDevice *device);
+

+Gets all keys for properties on device. +

+
++++ + + + + + + + + + + +

device :

A GUdevDevice.

Returns :

A NULL terminated string array of property keys. This array is owned by device and should not be freed by the caller. [transfer none][array zero-terminated=1][element-type utf8] +
+
+
+
+

g_udev_device_has_property ()

+
gboolean            g_udev_device_has_property          (GUdevDevice *device,
+                                                         const gchar *key);
+

+Check if a the property with the given key exists. +

+
++++ + + + + + + + + + + + + + + +

device :

A GUdevDevice.

key :

Name of property.

Returns :

+TRUE only if the value for key exist.
+
+
+
+

g_udev_device_get_property ()

+
const gchar *       g_udev_device_get_property          (GUdevDevice *device,
+                                                         const gchar *key);
+

+Look up the value for key on device. +

+
++++ + + + + + + + + + + + + + + +

device :

A GUdevDevice.

key :

Name of property.

Returns :

The value for key or NULL if key doesn't exist on device. Do not free this string, it is owned by device.
+
+
+
+

g_udev_device_get_property_as_int ()

+
gint                g_udev_device_get_property_as_int   (GUdevDevice *device,
+                                                         const gchar *key);
+

+Look up the value for key on device and convert it to an integer +using strtol(). +

+
++++ + + + + + + + + + + + + + + +

device :

A GUdevDevice.

key :

Name of property.

Returns :

The value for key or 0 if key doesn't exist or +isn't an integer.
+
+
+
+

g_udev_device_get_property_as_uint64 ()

+
guint64             g_udev_device_get_property_as_uint64
+                                                        (GUdevDevice *device,
+                                                         const gchar *key);
+

+Look up the value for key on device and convert it to an unsigned +64-bit integer using g_ascii_strtoull(). +

+
++++ + + + + + + + + + + + + + + +

device :

A GUdevDevice.

key :

Name of property.

Returns :

The value for key or 0 if key doesn't exist or isn't a +guint64.
+
+
+
+

g_udev_device_get_property_as_double ()

+
gdouble             g_udev_device_get_property_as_double
+                                                        (GUdevDevice *device,
+                                                         const gchar *key);
+

+Look up the value for key on device and convert it to a double +precision floating point number using strtod(). +

+
++++ + + + + + + + + + + + + + + +

device :

A GUdevDevice.

key :

Name of property.

Returns :

The value for key or 0.0 if key doesn't exist or isn't a +gdouble.
+
+
+
+

g_udev_device_get_property_as_boolean ()

+
gboolean            g_udev_device_get_property_as_boolean
+                                                        (GUdevDevice *device,
+                                                         const gchar *key);
+

+Look up the value for key on device and convert it to an +boolean. This is done by doing a case-insensitive string comparison +on the string value against "1" and "true". +

+
++++ + + + + + + + + + + + + + + +

device :

A GUdevDevice.

key :

Name of property.

Returns :

The value for key or FALSE if key doesn't exist or +isn't a gboolean.
+
+
+
+

g_udev_device_get_property_as_strv ()

+
const gchar * const * g_udev_device_get_property_as_strv
+                                                        (GUdevDevice *device,
+                                                         const gchar *key);
+

+Look up the value for key on device and return the result of +splitting it into non-empty tokens split at white space (only space +(' '), form-feed ('\f'), newline ('\n'), carriage return ('\r'), +horizontal tab ('\t'), and vertical tab ('\v') are considered; the +locale is not taken into account). +

+
++++ + + + + + + + + + + + + + + +

device :

A GUdevDevice.

key :

Name of property.

Returns :

The value of key on device split into tokens or NULL if key doesn't exist. This array is owned by device and should not be freed by the caller. [transfer none][array zero-terminated=1][element-type utf8] +
+
+
+
+

g_udev_device_get_sysfs_attr ()

+
const gchar *       g_udev_device_get_sysfs_attr        (GUdevDevice *device,
+                                                         const gchar *name);
+

+Look up the sysfs attribute with name on device. +

+
++++ + + + + + + + + + + + + + + +

device :

A GUdevDevice.

name :

Name of the sysfs attribute.

Returns :

The value of the sysfs attribute or NULL if there is no +such attribute. Do not free this string, it is owned by device.
+
+
+
+

g_udev_device_get_sysfs_attr_as_int ()

+
gint                g_udev_device_get_sysfs_attr_as_int (GUdevDevice *device,
+                                                         const gchar *name);
+

+Look up the sysfs attribute with name on device and convert it to an integer +using strtol(). +

+
++++ + + + + + + + + + + + + + + +

device :

A GUdevDevice.

name :

Name of the sysfs attribute.

Returns :

The value of the sysfs attribute or 0 if there is no such +attribute.
+
+
+
+

g_udev_device_get_sysfs_attr_as_uint64 ()

+
guint64             g_udev_device_get_sysfs_attr_as_uint64
+                                                        (GUdevDevice *device,
+                                                         const gchar *name);
+

+Look up the sysfs attribute with name on device and convert it to an unsigned +64-bit integer using g_ascii_strtoull(). +

+
++++ + + + + + + + + + + + + + + +

device :

A GUdevDevice.

name :

Name of the sysfs attribute.

Returns :

The value of the sysfs attribute or 0 if there is no such +attribute.
+
+
+
+

g_udev_device_get_sysfs_attr_as_double ()

+
gdouble             g_udev_device_get_sysfs_attr_as_double
+                                                        (GUdevDevice *device,
+                                                         const gchar *name);
+

+Look up the sysfs attribute with name on device and convert it to a double +precision floating point number using strtod(). +

+
++++ + + + + + + + + + + + + + + +

device :

A GUdevDevice.

name :

Name of the sysfs attribute.

Returns :

The value of the sysfs attribute or 0.0 if there is no such +attribute.
+
+
+
+

g_udev_device_get_sysfs_attr_as_boolean ()

+
gboolean            g_udev_device_get_sysfs_attr_as_boolean
+                                                        (GUdevDevice *device,
+                                                         const gchar *name);
+

+Look up the sysfs attribute with name on device and convert it to an +boolean. This is done by doing a case-insensitive string comparison +on the string value against "1" and "true". +

+
++++ + + + + + + + + + + + + + + +

device :

A GUdevDevice.

name :

Name of the sysfs attribute.

Returns :

The value of the sysfs attribute or FALSE if there is no such +attribute.
+
+
+
+

g_udev_device_get_sysfs_attr_as_strv ()

+
const gchar * const * g_udev_device_get_sysfs_attr_as_strv
+                                                        (GUdevDevice *device,
+                                                         const gchar *name);
+

+Look up the sysfs attribute with name on device and return the result of +splitting it into non-empty tokens split at white space (only space (' '), +form-feed ('\f'), newline ('\n'), carriage return ('\r'), horizontal +tab ('\t'), and vertical tab ('\v') are considered; the locale is +not taken into account). +

+
++++ + + + + + + + + + + + + + + +

device :

A GUdevDevice.

name :

Name of the sysfs attribute.

Returns :

The value of the sysfs attribute split into tokens or NULL if there is no such attribute. This array is owned by device and should not be freed by the caller. [transfer none][array zero-terminated=1][element-type utf8] +
+
+
+
+ + + \ No newline at end of file diff --git a/udev-lfs/gudev/GUdevEnumerator.html b/udev-lfs/gudev/GUdevEnumerator.html new file mode 100644 index 000000000..205ba223e --- /dev/null +++ b/udev-lfs/gudev/GUdevEnumerator.html @@ -0,0 +1,493 @@ + + + + +GUdevEnumerator + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GUdevEnumerator

+

GUdevEnumerator — Lookup and sort devices

+
+
+

Synopsis

+
                    GUdevEnumerator;
+struct              GUdevEnumeratorClass;
+GUdevEnumerator *   g_udev_enumerator_new               (GUdevClient *client);
+GUdevEnumerator *   g_udev_enumerator_add_match_subsystem
+                                                        (GUdevEnumerator *enumerator,
+                                                         const gchar *subsystem);
+GUdevEnumerator *   g_udev_enumerator_add_nomatch_subsystem
+                                                        (GUdevEnumerator *enumerator,
+                                                         const gchar *subsystem);
+GUdevEnumerator *   g_udev_enumerator_add_match_sysfs_attr
+                                                        (GUdevEnumerator *enumerator,
+                                                         const gchar *name,
+                                                         const gchar *value);
+GUdevEnumerator *   g_udev_enumerator_add_nomatch_sysfs_attr
+                                                        (GUdevEnumerator *enumerator,
+                                                         const gchar *name,
+                                                         const gchar *value);
+GUdevEnumerator *   g_udev_enumerator_add_match_property
+                                                        (GUdevEnumerator *enumerator,
+                                                         const gchar *name,
+                                                         const gchar *value);
+GUdevEnumerator *   g_udev_enumerator_add_match_name    (GUdevEnumerator *enumerator,
+                                                         const gchar *name);
+GUdevEnumerator *   g_udev_enumerator_add_match_tag     (GUdevEnumerator *enumerator,
+                                                         const gchar *tag);
+GUdevEnumerator *   g_udev_enumerator_add_match_is_initialized
+                                                        (GUdevEnumerator *enumerator);
+GUdevEnumerator *   g_udev_enumerator_add_sysfs_path    (GUdevEnumerator *enumerator,
+                                                         const gchar *sysfs_path);
+GList *             g_udev_enumerator_execute           (GUdevEnumerator *enumerator);
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----GUdevEnumerator
+
+
+
+

Properties

+
+  "client"                   GUdevClient*          : Read / Write / Construct Only
+
+
+
+

Description

+

+GUdevEnumerator is used to lookup and sort devices. +

+
+
+

Details

+
+

GUdevEnumerator

+
typedef struct _GUdevEnumerator GUdevEnumerator;
+

+The GUdevEnumerator struct is opaque and should not be accessed directly. +

+

Since 165

+
+
+
+

struct GUdevEnumeratorClass

+
struct GUdevEnumeratorClass {
+  GObjectClass   parent_class;
+};
+
+

+Class structure for GUdevEnumerator. +

+
++++ + + + + +

GObjectClass parent_class;

Parent class.
+

Since 165

+
+
+
+

g_udev_enumerator_new ()

+
GUdevEnumerator *   g_udev_enumerator_new               (GUdevClient *client);
+

+Constructs a GUdevEnumerator object that can be used to enumerate +and sort devices. Use the add_match_*() and add_nomatch_*() methods +and execute the query to get a list of devices with +g_udev_enumerator_execute(). +

+
++++ + + + + + + + + + + +

client :

A GUdevClient to enumerate devices from.

Returns :

A new GUdevEnumerator object. Free with g_object_unref().
+

Since 165

+
+
+
+

g_udev_enumerator_add_match_subsystem ()

+
GUdevEnumerator *   g_udev_enumerator_add_match_subsystem
+                                                        (GUdevEnumerator *enumerator,
+                                                         const gchar *subsystem);
+

+All returned devices will match the given subsystem. +

+
++++ + + + + + + + + + + + + + + +

enumerator :

A GUdevEnumerator.

subsystem :

Wildcard for subsystem name e.g. 'scsi' or 'a*'.

Returns :

The passed in enumerator. [transfer none] +
+

Since 165

+
+
+
+

g_udev_enumerator_add_nomatch_subsystem ()

+
GUdevEnumerator *   g_udev_enumerator_add_nomatch_subsystem
+                                                        (GUdevEnumerator *enumerator,
+                                                         const gchar *subsystem);
+

+All returned devices will not match the given subsystem. +

+
++++ + + + + + + + + + + + + + + +

enumerator :

A GUdevEnumerator.

subsystem :

Wildcard for subsystem name e.g. 'scsi' or 'a*'.

Returns :

The passed in enumerator. [transfer none] +
+

Since 165

+
+
+
+

g_udev_enumerator_add_match_sysfs_attr ()

+
GUdevEnumerator *   g_udev_enumerator_add_match_sysfs_attr
+                                                        (GUdevEnumerator *enumerator,
+                                                         const gchar *name,
+                                                         const gchar *value);
+

+All returned devices will have a sysfs attribute matching the given name and value. +

+
++++ + + + + + + + + + + + + + + + + + + +

enumerator :

A GUdevEnumerator.

name :

Wildcard filter for sysfs attribute key.

value :

Wildcard filter for sysfs attribute value.

Returns :

The passed in enumerator. [transfer none] +
+

Since 165

+
+
+
+

g_udev_enumerator_add_nomatch_sysfs_attr ()

+
GUdevEnumerator *   g_udev_enumerator_add_nomatch_sysfs_attr
+                                                        (GUdevEnumerator *enumerator,
+                                                         const gchar *name,
+                                                         const gchar *value);
+

+All returned devices will not have a sysfs attribute matching the given name and value. +

+
++++ + + + + + + + + + + + + + + + + + + +

enumerator :

A GUdevEnumerator.

name :

Wildcard filter for sysfs attribute key.

value :

Wildcard filter for sysfs attribute value.

Returns :

The passed in enumerator. [transfer none] +
+

Since 165

+
+
+
+

g_udev_enumerator_add_match_property ()

+
GUdevEnumerator *   g_udev_enumerator_add_match_property
+                                                        (GUdevEnumerator *enumerator,
+                                                         const gchar *name,
+                                                         const gchar *value);
+

+All returned devices will have a property matching the given name and value. +

+
++++ + + + + + + + + + + + + + + + + + + +

enumerator :

A GUdevEnumerator.

name :

Wildcard filter for property name.

value :

Wildcard filter for property value.

Returns :

The passed in enumerator. [transfer none] +
+

Since 165

+
+
+
+

g_udev_enumerator_add_match_name ()

+
GUdevEnumerator *   g_udev_enumerator_add_match_name    (GUdevEnumerator *enumerator,
+                                                         const gchar *name);
+

+All returned devices will match the given name. +

+
++++ + + + + + + + + + + + + + + +

enumerator :

A GUdevEnumerator.

name :

Wildcard filter for kernel name e.g. "sda*".

Returns :

The passed in enumerator. [transfer none] +
+

Since 165

+
+
+
+

g_udev_enumerator_add_match_tag ()

+
GUdevEnumerator *   g_udev_enumerator_add_match_tag     (GUdevEnumerator *enumerator,
+                                                         const gchar *tag);
+

+All returned devices will match the given tag. +

+
++++ + + + + + + + + + + + + + + +

enumerator :

A GUdevEnumerator.

tag :

A udev tag e.g. "udev-acl".

Returns :

The passed in enumerator. [transfer none] +
+

Since 165

+
+
+
+

g_udev_enumerator_add_match_is_initialized ()

+
GUdevEnumerator *   g_udev_enumerator_add_match_is_initialized
+                                                        (GUdevEnumerator *enumerator);
+

+All returned devices will be initialized. +

+
++++ + + + + + + + + + + +

enumerator :

A GUdevEnumerator.

Returns :

The passed in enumerator. [transfer none] +
+

Since 165

+
+
+
+

g_udev_enumerator_add_sysfs_path ()

+
GUdevEnumerator *   g_udev_enumerator_add_sysfs_path    (GUdevEnumerator *enumerator,
+                                                         const gchar *sysfs_path);
+

+Add a device to the list of devices, to retrieve it back sorted in dependency order. +

+
++++ + + + + + + + + + + + + + + +

enumerator :

A GUdevEnumerator.

sysfs_path :

A sysfs path, e.g. "/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda"

Returns :

The passed in enumerator. [transfer none] +
+

Since 165

+
+
+
+

g_udev_enumerator_execute ()

+
GList *             g_udev_enumerator_execute           (GUdevEnumerator *enumerator);
+

+Executes the query in enumerator. +

+
++++ + + + + + + + + + + +

enumerator :

A GUdevEnumerator.

Returns :

A list of GUdevDevice objects. The caller should free the result by using g_object_unref() on each element in the list and then g_list_free() on the list. [element-type GUdevDevice][transfer full] +
+

Since 165

+
+
+
+

Property Details

+
+

The "client" property

+
  "client"                   GUdevClient*          : Read / Write / Construct Only
+

+The GUdevClient to enumerate devices from. +

+

Since 165

+
+
+
+ + + \ No newline at end of file diff --git a/udev-lfs/gudev/annotation-glossary.html b/udev-lfs/gudev/annotation-glossary.html new file mode 100644 index 000000000..36962371e --- /dev/null +++ b/udev-lfs/gudev/annotation-glossary.html @@ -0,0 +1,56 @@ + + + + +Annotation Glossary + + + + + + + + + + + + + + + + + + +
+

+Annotation Glossary

+

A

+
+array
+

Parameter points to an array of items.

+
+allow-none
+

NULL is ok, both for passing and for returning.

+

E

+
+element-type
+

Generics and defining elements of containers and arrays.

+

T

+
+transfer full
+

Free data after the code is done.

+
+transfer none
+

Don't free data after the code is done.

+
+ + + \ No newline at end of file diff --git a/udev-lfs/gudev/api-index-deprecated.html b/udev-lfs/gudev/api-index-deprecated.html new file mode 100644 index 000000000..6313084bc --- /dev/null +++ b/udev-lfs/gudev/api-index-deprecated.html @@ -0,0 +1,31 @@ + + + + +Index of deprecated API + + + + + + + + + + + + + + + + +
+

+Index of deprecated API

+ +
+ + + \ No newline at end of file diff --git a/udev-lfs/gudev/api-index-full.html b/udev-lfs/gudev/api-index-full.html new file mode 100644 index 000000000..d76cc85e7 --- /dev/null +++ b/udev-lfs/gudev/api-index-full.html @@ -0,0 +1,281 @@ + + + + +API Index + + + + + + + + + + + + + + + + + + + +
+

+API Index

+

C

+
+g_udev_client_new, function in GUdevClient +
+
+
+g_udev_client_query_by_device_file, function in GUdevClient +
+
+
+g_udev_client_query_by_device_number, function in GUdevClient +
+
+
+g_udev_client_query_by_subsystem, function in GUdevClient +
+
+
+g_udev_client_query_by_subsystem_and_name, function in GUdevClient +
+
+
+g_udev_client_query_by_sysfs_path, function in GUdevClient +
+
+

D

+
+g_udev_device_get_action, function in GUdevDevice +
+
+
+g_udev_device_get_device_file, function in GUdevDevice +
+
+
+g_udev_device_get_device_file_symlinks, function in GUdevDevice +
+
+
+g_udev_device_get_device_number, function in GUdevDevice +
+
+
+g_udev_device_get_device_type, function in GUdevDevice +
+
+
+g_udev_device_get_devtype, function in GUdevDevice +
+
+
+g_udev_device_get_driver, function in GUdevDevice +
+
+
+g_udev_device_get_is_initialized, function in GUdevDevice +
+
+
+g_udev_device_get_name, function in GUdevDevice +
+
+
+g_udev_device_get_number, function in GUdevDevice +
+
+
+g_udev_device_get_parent, function in GUdevDevice +
+
+
+g_udev_device_get_parent_with_subsystem, function in GUdevDevice +
+
+
+g_udev_device_get_property, function in GUdevDevice +
+
+
+g_udev_device_get_property_as_boolean, function in GUdevDevice +
+
+
+g_udev_device_get_property_as_double, function in GUdevDevice +
+
+
+g_udev_device_get_property_as_int, function in GUdevDevice +
+
+
+g_udev_device_get_property_as_strv, function in GUdevDevice +
+
+
+g_udev_device_get_property_as_uint64, function in GUdevDevice +
+
+
+g_udev_device_get_property_keys, function in GUdevDevice +
+
+
+g_udev_device_get_seqnum, function in GUdevDevice +
+
+
+g_udev_device_get_subsystem, function in GUdevDevice +
+
+
+g_udev_device_get_sysfs_attr, function in GUdevDevice +
+
+
+g_udev_device_get_sysfs_attr_as_boolean, function in GUdevDevice +
+
+
+g_udev_device_get_sysfs_attr_as_double, function in GUdevDevice +
+
+
+g_udev_device_get_sysfs_attr_as_int, function in GUdevDevice +
+
+
+g_udev_device_get_sysfs_attr_as_strv, function in GUdevDevice +
+
+
+g_udev_device_get_sysfs_attr_as_uint64, function in GUdevDevice +
+
+
+g_udev_device_get_sysfs_path, function in GUdevDevice +
+
+
+g_udev_device_get_tags, function in GUdevDevice +
+
+
+g_udev_device_get_usec_since_initialized, function in GUdevDevice +
+
+
+g_udev_device_has_property, function in GUdevDevice +
+
+

E

+
+g_udev_enumerator_add_match_is_initialized, function in GUdevEnumerator +
+
+
+g_udev_enumerator_add_match_name, function in GUdevEnumerator +
+
+
+g_udev_enumerator_add_match_property, function in GUdevEnumerator +
+
+
+g_udev_enumerator_add_match_subsystem, function in GUdevEnumerator +
+
+
+g_udev_enumerator_add_match_sysfs_attr, function in GUdevEnumerator +
+
+
+g_udev_enumerator_add_match_tag, function in GUdevEnumerator +
+
+
+g_udev_enumerator_add_nomatch_subsystem, function in GUdevEnumerator +
+
+
+g_udev_enumerator_add_nomatch_sysfs_attr, function in GUdevEnumerator +
+
+
+g_udev_enumerator_add_sysfs_path, function in GUdevEnumerator +
+
+
+g_udev_enumerator_execute, function in GUdevEnumerator +
+
+
+g_udev_enumerator_new, function in GUdevEnumerator +
+
+

G

+
+GUdevClient, struct in GUdevClient +
+
+
+GUdevClient::uevent, object signal in GUdevClient +
+
+
+GUdevClient:subsystems, object property in GUdevClient +
+
+
+GUdevClientClass, struct in GUdevClient +
+
+
+GUdevDevice, struct in GUdevDevice +
+
+
+GUdevDeviceClass, struct in GUdevDevice +
+
+
+GUdevDeviceNumber, typedef in GUdevClient +
+
+
+GUdevDeviceType, enum in GUdevClient +
+
+
+GUdevEnumerator, struct in GUdevEnumerator +
+
+
+GUdevEnumerator:client, object property in GUdevEnumerator +
+
+
+GUdevEnumeratorClass, struct in GUdevEnumerator +
+
+
+ + + \ No newline at end of file diff --git a/udev-lfs/gudev/gudev-hierarchy.html b/udev-lfs/gudev/gudev-hierarchy.html new file mode 100644 index 000000000..7ff7ac38c --- /dev/null +++ b/udev-lfs/gudev/gudev-hierarchy.html @@ -0,0 +1,38 @@ + + + + +Object Hierarchy + + + + + + + + + + + + + + + + +
+

+Object Hierarchy

+
+    GObject
+        GUdevDevice
+        GUdevClient
+        GUdevEnumerator
+    GEnum
+        GUdevDeviceType
+
+
+ + + \ No newline at end of file diff --git a/udev-lfs/gudev/gudev.devhelp2 b/udev-lfs/gudev/gudev.devhelp2 new file mode 100644 index 000000000..ab7cc30c2 --- /dev/null +++ b/udev-lfs/gudev/gudev.devhelp2 @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/udev-lfs/gudev/home.png b/udev-lfs/gudev/home.png new file mode 100644 index 000000000..17003611d Binary files /dev/null and b/udev-lfs/gudev/home.png differ diff --git a/udev-lfs/gudev/index.html b/udev-lfs/gudev/index.html new file mode 100644 index 000000000..ecb3161a3 --- /dev/null +++ b/udev-lfs/gudev/index.html @@ -0,0 +1,53 @@ + + + + +GUdev Reference Manual + + + + + + + +
+
+
+
+

+ For version 199 + — the latest version of this + documentation can be found at + + http://www.freedesktop.org/software/systemd/gudev/ + . +

+
+
+
+
+
+
API Reference
+
+
+GUdevClient — Query devices and listen to uevents +
+
+GUdevDevice — Get information about a device +
+
+GUdevEnumerator — Lookup and sort devices +
+
+
Object Hierarchy
+
API Index
+
Index of new symbols in 165
+
Index of deprecated API
+
Annotation Glossary
+
+
+ + + \ No newline at end of file diff --git a/udev-lfs/gudev/index.sgml b/udev-lfs/gudev/index.sgml new file mode 100644 index 000000000..f92571122 --- /dev/null +++ b/udev-lfs/gudev/index.sgml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/udev-lfs/gudev/ix02.html b/udev-lfs/gudev/ix02.html new file mode 100644 index 000000000..046cf450c --- /dev/null +++ b/udev-lfs/gudev/ix02.html @@ -0,0 +1,110 @@ + + + + +Index of new symbols in 165 + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/udev-lfs/gudev/left.png b/udev-lfs/gudev/left.png new file mode 100644 index 000000000..2d05b3d5b Binary files /dev/null and b/udev-lfs/gudev/left.png differ diff --git a/udev-lfs/gudev/ref-API.html b/udev-lfs/gudev/ref-API.html new file mode 100644 index 000000000..52e9e9a1b --- /dev/null +++ b/udev-lfs/gudev/ref-API.html @@ -0,0 +1,41 @@ + + + + +API Reference + + + + + + + + + + + + + + + + +
+

+API Reference

+
+
+GUdevClient — Query devices and listen to uevents +
+
+GUdevDevice — Get information about a device +
+
+GUdevEnumerator — Lookup and sort devices +
+
+
+ + + \ No newline at end of file diff --git a/udev-lfs/gudev/right.png b/udev-lfs/gudev/right.png new file mode 100644 index 000000000..92832e3a4 Binary files /dev/null and b/udev-lfs/gudev/right.png differ diff --git a/udev-lfs/gudev/style.css b/udev-lfs/gudev/style.css new file mode 100644 index 000000000..d6f6c26ec --- /dev/null +++ b/udev-lfs/gudev/style.css @@ -0,0 +1,266 @@ +.synopsis, .classsynopsis +{ + /* tango:aluminium 1/2 */ + background: #eeeeec; + border: solid 1px #d3d7cf; + padding: 0.5em; +} +.programlisting +{ + /* tango:sky blue 0/1 */ + background: #e6f3ff; + border: solid 1px #729fcf; + padding: 0.5em; +} +.variablelist +{ + padding: 4px; + margin-left: 3em; +} +.variablelist td:first-child +{ + vertical-align: top; +} + +@media screen { + sup a.footnote + { + position: relative; + top: 0em ! important; + + } + /* this is needed so that the local anchors are displayed below the naviagtion */ + div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] + { + display: inline-block; + position: relative; + top:-5em; + } + /* this seems to be a bug in the xsl style sheets when generating indexes */ + div.index div.index + { + top: 0em; + } + /* make space for the fixed navigation bar and add space at the bottom so that + * link targets appear somewhat close to top + */ + body + { + padding-top: 3.2em; + padding-bottom: 20em; + } + /* style and size the navigation bar */ + table.navigation#top + { + position: fixed; + /* tango:scarlet red 0/1 */ + background: #ffe6e6; + border: solid 1px #ef2929; + margin-top: 0; + margin-bottom: 0; + top: 0; + left: 0; + height: 3em; + z-index: 10; + } + .navigation a, .navigation a:visited + { + /* tango:scarlet red 3 */ + color: #a40000; + } + .navigation a:hover + { + /* tango:scarlet red 1 */ + color: #ef2929; + } + td.shortcuts + { + /* tango:scarlet red 1 */ + color: #ef2929; + font-size: 80%; + white-space: nowrap; + } +} +@media print { + table.navigation { + visibility: collapse; + display: none; + } + div.titlepage table.navigation { + visibility: visible; + display: table; + /* tango:scarlet red 0/1 */ + background: #ffe6e6; + border: solid 1px #ef2929; + margin-top: 0; + margin-bottom: 0; + top: 0; + left: 0; + height: 3em; + } +} + +.navigation .title +{ + font-size: 200%; +} + +div.gallery-float +{ + float: left; + padding: 10px; +} +div.gallery-float img +{ + border-style: none; +} +div.gallery-spacer +{ + clear: both; +} + +a, a:visited +{ + text-decoration: none; + /* tango:sky blue 2 */ + color: #3465a4; +} +a:hover +{ + text-decoration: underline; + /* tango:sky blue 1 */ + color: #729fcf; +} + +div.table table +{ + border-collapse: collapse; + border-spacing: 0px; + /* tango:aluminium 3 */ + border: solid 1px #babdb6; +} + +div.table table td, div.table table th +{ + /* tango:aluminium 3 */ + border: solid 1px #babdb6; + padding: 3px; + vertical-align: top; +} + +div.table table th +{ + /* tango:aluminium 2 */ + background-color: #d3d7cf; +} + +hr +{ + /* tango:aluminium 3 */ + color: #babdb6; + background: #babdb6; + border: none 0px; + height: 1px; + clear: both; +} + +.footer +{ + padding-top: 3.5em; + /* tango:aluminium 3 */ + color: #babdb6; + text-align: center; + font-size: 80%; +} + +.warning +{ + /* tango:orange 0/1 */ + background: #ffeed9; + border-color: #ffb04f; +} +.note +{ + /* tango:chameleon 0/0.5 */ + background: #d8ffb2; + border-color: #abf562; +} +.note, .warning +{ + padding: 0.5em; + border-width: 1px; + border-style: solid; +} +.note h3, .warning h3 +{ + margin-top: 0.0em +} +.note p, .warning p +{ + margin-bottom: 0.0em +} + +/* blob links */ +h2 .extralinks, h3 .extralinks +{ + float: right; + /* tango:aluminium 3 */ + color: #babdb6; + font-size: 80%; + font-weight: normal; +} + +.annotation +{ + /* tango:aluminium 5 */ + color: #555753; + font-size: 80%; + font-weight: normal; +} + +/* code listings */ + +.listing_code .programlisting .cbracket { color: #a40000; } /* tango: scarlet red 3 */ +.listing_code .programlisting .comment { color: #a1a39d; } /* tango: aluminium 4 */ +.listing_code .programlisting .function { color: #000000; font-weight: bold; } +.listing_code .programlisting .function a { color: #11326b; font-weight: bold; } /* tango: sky blue 4 */ +.listing_code .programlisting .keyword { color: #4e9a06; } /* tango: chameleon 3 */ +.listing_code .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */ +.listing_code .programlisting .normal { color: #000000; } +.listing_code .programlisting .number { color: #75507b; } /* tango: plum 2 */ +.listing_code .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */ +.listing_code .programlisting .string { color: #c17d11; } /* tango: chocolate 2 */ +.listing_code .programlisting .type { color: #000000; } +.listing_code .programlisting .type a { color: #11326b; } /* tango: sky blue 4 */ +.listing_code .programlisting .symbol { color: #ce5c00; } /* tango: orange 3 */ + +.listing_frame { + /* tango:sky blue 1 */ + border: solid 1px #729fcf; + padding: 0px; +} + +.listing_lines, .listing_code { + margin-top: 0px; + margin-bottom: 0px; + padding: 0.5em; +} +.listing_lines { + /* tango:sky blue 0.5 */ + background: #a6c5e3; + /* tango:aluminium 6 */ + color: #2e3436; +} +.listing_code { + /* tango:sky blue 0 */ + background: #e6f3ff; +} +.listing_code .programlisting { + /* override from previous */ + border: none 0px; + padding: 0px; +} +.listing_lines pre, .listing_code pre { + margin: 0px; +} + diff --git a/udev-lfs/gudev/up.png b/udev-lfs/gudev/up.png new file mode 100644 index 000000000..85b3e2a27 Binary files /dev/null and b/udev-lfs/gudev/up.png differ diff --git a/udev-lfs/makefile-incl.gudev b/udev-lfs/makefile-incl.gudev index b560fcd6e..ec0e3982a 100644 --- a/udev-lfs/makefile-incl.gudev +++ b/udev-lfs/makefile-incl.gudev @@ -103,6 +103,6 @@ install-gudev: gudev @ln -svfn $(LIBGUDEV_REAL_NAME) $(DESTDIR)/usr/lib/$(LIBGUDEV_SONAME) @ln -svfn $(LIBGUDEV_REAL_NAME) $(DESTDIR)/usr/lib/$(LIBGUDEV_LINK_NAME) - @cp -v build/gudev-1.0.pc $(DESTDIR)/usr/lib/pkgconfig - @cp -v docs/gudev/html/* $(DESTDIR)/usr/share/gtk-doc/html/gudev + @cp -v build/gudev-1.0.pc $(DESTDIR)/usr/lib/pkgconfig + @cp -v udev-lfs-$(VERSION)/gudev/* $(DESTDIR)/usr/share/gtk-doc/html/gudev diff --git a/udev-lfs/udev.7 b/udev-lfs/udev.7 new file mode 100644 index 000000000..1cdd926e3 --- /dev/null +++ b/udev-lfs/udev.7 @@ -0,0 +1,476 @@ +'\" t +.TH "UDEV" "7" "" "systemd 199" "udev" +.\" ----------------------------------------------------------------- +.\" * 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" +udev \- Linux dynamic device management +.SH "DESCRIPTION" +.PP +udev supplies the system software with device events, manages permissions of device nodes and may create additional symlinks in the +/dev +directory, or renames network interfaces\&. The kernel usually just assigns unpredictable device names based on the order of discovery\&. Meaningful symlinks or network device names provide a way to reliably identify devices based on their properties or current configuration\&. +.PP +The udev daemon, +\fBudevd\fR(8), receives device uevents directly from the kernel whenever a device is added or removed from the system, or it changes its state\&. When udev receives a device event, it matches its configured set of rules against various device attributes to identify the device\&. Rules that match may provide additional device information to be stored in the udev database or to be used to create meaningful symlink names\&. +.PP +All device information udev processes is stored in the udev database and sent out to possible event subscribers\&. Access to all stored data and the event sources is provided by the library libudev\&. +.SH "RULES FILES" +.PP +The udev rules are read from the files located in the system rules directory +/usr/lib/udev/rules\&.d, the volatile runtime directory +/run/udev/rules\&.d +and the local administration directory +/etc/udev/rules\&.d\&. All rules files are collectively sorted and processed in lexical order, regardless of the directories in which they live\&. However, files with identical file names replace each other\&. Files in +/etc +have the highest priority, files in +/run +take precedence over files with the same name in +/lib\&. This can be used to override a system\-supplied rules file with a local file if needed; a symlink in +/etc +with the same name as a rules file in +/lib, pointing to +/dev/null, disables the rules file entirely\&. +.PP +Rule files must have the extension +\&.rules; other extensions are ignored\&. +.PP +Every line in the rules file contains at least one key\-value pair\&. Except for empty lines or lines beginning with \*(Aq#\*(Aq, which are ignored\&. There are two kinds of keys: match and assignment\&. If all match keys match against their values, the rule gets applied and the assignment keys get the specified values assigned\&. +.PP +A matching rule may rename a network interface, add symlinks pointing to the device node, or run a specified program as part of the event handling\&. +.PP +A rule consists of a comma\-separated list of one or more key\-value pairs\&. Each key has a distinct operation, depending on the used operator\&. Valid operators are: +.PP +== +.RS 4 +Compare for equality\&. +.RE +.PP +!= +.RS 4 +Compare for inequality\&. +.RE +.PP += +.RS 4 +Assign a value to a key\&. Keys that represent a list are reset and only this single value is assigned\&. +.RE +.PP ++= +.RS 4 +Add the value to a key that holds a list of entries\&. +.RE +.PP +:= +.RS 4 +Assign a value to a key finally; disallow any later changes\&. +.RE +.PP +The following key names can be used to match against device properties\&. Some of the keys also match against properties of the parent devices in sysfs, not only the device that has generated the event\&. If multiple keys that match a parent device are specified in a single rule, all these keys must match at one and the same parent device\&. +.PP +\fBACTION\fR +.RS 4 +Match the name of the event action\&. +.RE +.PP +\fBDEVPATH\fR +.RS 4 +Match the devpath of the event device\&. +.RE +.PP +\fBKERNEL\fR +.RS 4 +Match the name of the event device\&. +.RE +.PP +\fBNAME\fR +.RS 4 +Match the name of a network interface\&. It can be used once the NAME key has been set in one of the preceding rules\&. +.RE +.PP +\fBSYMLINK\fR +.RS 4 +Match the name of a symlink targeting the node\&. It can be used once a SYMLINK key has been set in one of the preceding rules\&. There may be multiple symlinks; only one needs to match\&. +.RE +.PP +\fBSUBSYSTEM\fR +.RS 4 +Match the subsystem of the event device\&. +.RE +.PP +\fBDRIVER\fR +.RS 4 +Match the driver name of the event device\&. Only set this key for devices which are bound to a driver at the time the event is generated\&. +.RE +.PP +\fBATTR{\fR\fB\fIfilename\fR\fR\fB}\fR +.RS 4 +Match sysfs attribute values of the event device\&. Trailing whitespace in the attribute values is ignored unless the specified match value itself contains trailing whitespace\&. +.RE +.PP +\fBKERNELS\fR +.RS 4 +Search the devpath upwards for a matching device name\&. +.RE +.PP +\fBSUBSYSTEMS\fR +.RS 4 +Search the devpath upwards for a matching device subsystem name\&. +.RE +.PP +\fBDRIVERS\fR +.RS 4 +Search the devpath upwards for a matching device driver name\&. +.RE +.PP +\fBATTRS{\fR\fB\fIfilename\fR\fR\fB}\fR +.RS 4 +Search the devpath upwards for a device with matching sysfs attribute values\&. If multiple +\fBATTRS\fR +matches are specified, all of them must match on the same device\&. Trailing whitespace in the attribute values is ignored unless the specified match value itself contains trailing whitespace\&. +.RE +.PP +\fBTAGS\fR +.RS 4 +Search the devpath upwards for a device with matching tag\&. +.RE +.PP +\fBENV{\fR\fB\fIkey\fR\fR\fB}\fR +.RS 4 +Match against a device property value\&. +.RE +.PP +\fBTAG\fR +.RS 4 +Match against a device tag\&. +.RE +.PP +\fBTEST{\fR\fB\fIoctal mode mask\fR\fR\fB}\fR +.RS 4 +Test the existence of a file\&. An octal mode mask can be specified if needed\&. +.RE +.PP +\fBPROGRAM\fR +.RS 4 +Execute a program to determine whether there is a match; the key is true if the program returns successfully\&. The device properties are made available to the executed program in the environment\&. The program\*(Aqs stdout is available in the RESULT key\&. +.sp +This can only be used for very short\-running foreground tasks\&. For details see +\fBRUN\fR\&. +.RE +.PP +\fBRESULT\fR +.RS 4 +Match the returned string of the last PROGRAM call\&. This key can be used in the same or in any later rule after a PROGRAM call\&. +.RE +.PP +Most of the fields support shell\-style pattern matching\&. The following pattern characters are supported: +.PP +* +.RS 4 +Matches zero or more characters\&. +.RE +.PP +? +.RS 4 +Matches any single character\&. +.RE +.PP +[] +.RS 4 +Matches any single character specified within the brackets\&. For example, the pattern string \*(Aqtty[SR]\*(Aq would match either \*(AqttyS\*(Aq or \*(AqttyR\*(Aq\&. Ranges are also supported via the \*(Aq\-\*(Aq character\&. For example, to match on the range of all digits, the pattern [0\-9] could be used\&. If the first character following the \*(Aq[\*(Aq is a \*(Aq!\*(Aq, any characters not enclosed are matched\&. +.RE +.PP +The following keys can get values assigned: +.PP +\fBNAME\fR +.RS 4 +The name to use for a network interface\&. The name of a device node cannot be changed by udev, only additional symlinks can be created\&. +.RE +.PP +\fBSYMLINK\fR +.RS 4 +The name of a symlink targeting the node\&. Every matching rule adds this value to the list of symlinks to be created\&. +.sp +The set of characters to name a symlink is limited\&. Allowed characters are [0\-9A\-Za\-z#+\-\&.:=@_/], valid utf8 character sequences, and "\ex00" hex encoding\&. All other characters are replaced by a \*(Aq_\*(Aq character\&. +.sp +Multiple symlinks may be specified by separating the names by the space character\&. In case multiple devices claim the same name, the link always points to the device with the highest link_priority\&. If the current device goes away, the links are re\-evaluated and the device with the next highest link_priority becomes the owner of the link\&. If no link_priority is specified, the order of the devices (and which one of them owns the link) is undefined\&. +.sp +Symlink names must never conflict with the kernel\*(Aqs default device node names, as that would result in unpredictable behavior\&. +.RE +.PP +\fBOWNER\fR, \fBGROUP\fR, \fBMODE\fR +.RS 4 +The permissions for the device node\&. Every specified value overrides the compiled\-in default value\&. +.RE +.PP +\fBATTR{\fR\fB\fIkey\fR\fR\fB}\fR +.RS 4 +The value that should be written to a sysfs attribute of the event device\&. +.RE +.PP +\fBENV{\fR\fB\fIkey\fR\fR\fB}\fR +.RS 4 +Set a device property value\&. Property names with a leading \*(Aq\&.\*(Aq are neither stored in the database nor exported to events or external tools (run by, say, the PROGRAM match key)\&. +.RE +.PP +\fBTAG\fR +.RS 4 +Attach a tag to a device\&. This is used to filter events for users of libudev\*(Aqs monitor functionality, or to enumerate a group of tagged devices\&. The implementation can only work efficiently if only a few tags are attached to a device\&. It is only meant to be used in contexts with specific device filter requirements, and not as a general\-purpose flag\&. Excessive use might result in inefficient event handling\&. +.RE +.PP +\fBRUN{\fR\fB\fItype\fR\fR\fB}\fR +.RS 4 +Add a program to the list of programs to be executed after processing all the rules for a specific event, depending on +type: +.PP +program +.RS 4 +Execute an external program specified as the assigned value\&. If no absolute path is given, the program is expected to live in /usr/lib/udev, otherwise the absolute path must be specified\&. +.sp +This is the default if no +\fItype\fR +is specified\&. +.RE +.PP +builtin +.RS 4 +As +\fBprogram\fR, but use one of the built\-in programs rather than an external one\&. +.RE +.sp +The program name and following arguments are separated by spaces\&. Single quotes can be used to specify arguments with spaces\&. +.sp +This can only be used for very short\-running foreground tasks\&. Running an event process for a long period of time may block all further events for this or a dependent device\&. +.sp +Starting daemons or other long running processes is not appropriate for udev; the forked processes, detached or not, will be unconditionally killed after the event handling has finished\&. +.RE +.PP +\fBLABEL\fR +.RS 4 +A named label to which a GOTO may jump\&. +.RE +.PP +\fBGOTO\fR +.RS 4 +Jumps to the next LABEL with a matching name\&. +.RE +.PP +\fBIMPORT{\fR\fB\fItype\fR\fR\fB}\fR +.RS 4 +Import a set of variables as device properties, depending on +type: +.PP +program +.RS 4 +Execute an external program specified as the assigned value and import its output, which must be in environment key format\&. Path specification, command/argument separation, and quoting work like in +\fBRUN\fR\&. +.RE +.PP +builtin +.RS 4 +As +\fBprogram\fR, but use one of the built\-in programs rather than an external one\&. +.RE +.PP +file +.RS 4 +Import a text file specified as the assigned value, the content of which must be in environment key format\&. +.RE +.PP +db +.RS 4 +Import a single property specified as the assigned value from the current device database\&. This works only if the database is already populated by an earlier event\&. +.RE +.PP +cmdline +.RS 4 +Import a single property from the kernel command line\&. For simple flags the value of the property is set to \*(Aq1\*(Aq\&. +.RE +.PP +parent +.RS 4 +Import the stored keys from the parent device by reading the database entry of the parent device\&. The value assigned to +\fBIMPORT{parent}\fR +is used as a filter of key names to import (with the same shell\-style pattern matching used for comparisons)\&. +.RE +.sp +This can only be used for very short\-running foreground tasks\&. For details see +\fBRUN\fR\&. +.RE +.PP +\fBWAIT_FOR\fR +.RS 4 +Wait for a file to become available or until a timeout of 10 seconds expires\&. The path is relative to the sysfs device; if no path is specified, this waits for an attribute to appear\&. +.RE +.PP +\fBOPTIONS\fR +.RS 4 +Rule and device options: +.PP +\fBlink_priority=\fR\fB\fIvalue\fR\fR +.RS 4 +Specify the priority of the created symlinks\&. Devices with higher priorities overwrite existing symlinks of other devices\&. The default is 0\&. +.RE +.PP +\fBevent_timeout=\fR +.RS 4 +Number of seconds an event waits for operations to finish before giving up and terminating itself\&. +.RE +.PP +\fBstring_escape=\fR\fB\fInone|replace\fR\fR +.RS 4 +Usually control and other possibly unsafe characters are replaced in strings used for device naming\&. The mode of replacement can be specified with this option\&. +.RE +.PP +\fBstatic_node=\fR +.RS 4 +Apply the permissions specified in this rule to the static device node with the specified name\&. Static device node creation can be requested by kernel modules\&. These nodes might not have a corresponding kernel device at the time udevd is started; they can trigger automatic kernel module loading\&. +.RE +.PP +\fBwatch\fR +.RS 4 +Watch the device node with inotify; when the node is closed after being opened for writing, a change uevent is synthesized\&. +.RE +.PP +\fBnowatch\fR +.RS 4 +Disable the watching of a device node with inotify\&. +.RE +.RE +.PP +The +\fBNAME\fR, +\fBSYMLINK\fR, +\fBPROGRAM\fR, +\fBOWNER\fR, +\fBGROUP\fR, +\fBMODE\fR +and +\fBRUN\fR +fields support simple string substitutions\&. The +\fBRUN\fR +substitutions are performed after all rules have been processed, right before the program is executed, allowing for the use of device properties set by earlier matching rules\&. For all other fields, substitutions are performed while the individual rule is being processed\&. The available substitutions are: +.PP +\fB$kernel\fR, \fB%k\fR +.RS 4 +The kernel name for this device\&. +.RE +.PP +\fB$number\fR, \fB%n\fR +.RS 4 +The kernel number for this device\&. For example, \*(Aqsda3\*(Aq has kernel number of \*(Aq3\*(Aq +.RE +.PP +\fB$devpath\fR, \fB%p\fR +.RS 4 +The devpath of the device\&. +.RE +.PP +\fB$id\fR, \fB%b\fR +.RS 4 +The name of the device matched while searching the devpath upwards for +\fBSUBSYSTEMS\fR, +\fBKERNELS\fR, +\fBDRIVERS\fR +and +\fBATTRS\fR\&. +.RE +.PP +\fB$driver\fR +.RS 4 +The driver name of the device matched while searching the devpath upwards for +\fBSUBSYSTEMS\fR, +\fBKERNELS\fR, +\fBDRIVERS\fR +and +\fBATTRS\fR\&. +.RE +.PP +\fB$attr{\fR\fB\fIfile\fR\fR\fB}\fR, \fB%s{\fR\fB\fIfile\fR\fR\fB}\fR +.RS 4 +The value of a sysfs attribute found at the device where all keys of the rule have matched\&. If the matching device does not have such an attribute, and a previous KERNELS, SUBSYSTEMS, DRIVERS, or ATTRS test selected a parent device, then the attribute from that parent device is used\&. +.sp +If the attribute is a symlink, the last element of the symlink target is returned as the value\&. +.RE +.PP +\fB$env{\fR\fB\fIkey\fR\fR\fB}\fR, \fB%E{\fR\fB\fIkey\fR\fR\fB}\fR +.RS 4 +A device property value\&. +.RE +.PP +\fB$major\fR, \fB%M\fR +.RS 4 +The kernel major number for the device\&. +.RE +.PP +\fB$minor\fR, \fB%m\fR +.RS 4 +The kernel minor number for the device\&. +.RE +.PP +\fB$result\fR, \fB%c\fR +.RS 4 +The string returned by the external program requested with PROGRAM\&. A single part of the string, separated by a space character, may be selected by specifying the part number as an attribute: +\fB%c{N}\fR\&. If the number is followed by the \*(Aq+\*(Aq character, this part plus all remaining parts of the result string are substituted: +\fB%c{N+}\fR +.RE +.PP +\fB$parent\fR, \fB%P\fR +.RS 4 +The node name of the parent device\&. +.RE +.PP +\fB$name\fR +.RS 4 +The current name of the device\&. If not changed by a rule, it is the name of the kernel device\&. +.RE +.PP +\fB$links\fR +.RS 4 +A space\-separated list of the current symlinks\&. The value is only set during a remove event or if an earlier rule assigned a value\&. +.RE +.PP +\fB$root\fR, \fB%r\fR +.RS 4 +The udev_root value\&. +.RE +.PP +\fB$sys\fR, \fB%S\fR +.RS 4 +The sysfs mount point\&. +.RE +.PP +\fB$devnode\fR, \fB%N\fR +.RS 4 +The name of the device node\&. +.RE +.PP +%% +.RS 4 +The \*(Aq%\*(Aq character itself\&. +.RE +.PP +$$ +.RS 4 +The \*(Aq$\*(Aq character itself\&. +.RE +.SH "SEE ALSO" +.PP +\fBudevd\fR(8), +\fBudevadm\fR(8) diff --git a/udev-lfs/udevadm.8 b/udev-lfs/udevadm.8 new file mode 100644 index 000000000..56b57801a --- /dev/null +++ b/udev-lfs/udevadm.8 @@ -0,0 +1,372 @@ +'\" t +.TH "UDEVADM" "8" "" "systemd 199" "udevadm" +.\" ----------------------------------------------------------------- +.\" * 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" +udevadm \- udev management tool +.SH "SYNOPSIS" +.HP \w'\fBudevadm\fR\ 'u +\fBudevadm\fR [\fB\-\-debug\fR] [\fB\-\-version\fR] [\fB\-\-help\fR] +.HP \w'\fBudevadm\ info\ \fR\fB\fIoptions\fR\fR\ 'u +\fBudevadm info \fR\fB\fIoptions\fR\fR +.HP \w'\fBudevadm\ trigger\ \fR\fB[options]\fR\ 'u +\fBudevadm trigger \fR\fB[options]\fR +.HP \w'\fBudevadm\ settle\ \fR\fB[options]\fR\ 'u +\fBudevadm settle \fR\fB[options]\fR +.HP \w'\fBudevadm\ control\ \fR\fB\fIcommand\fR\fR\ 'u +\fBudevadm control \fR\fB\fIcommand\fR\fR +.HP \w'\fBudevadm\ monitor\ \fR\fB[options]\fR\ 'u +\fBudevadm monitor \fR\fB[options]\fR +.HP \w'\fBudevadm\ hwdb\ \fR\fB[options]\fR\ 'u +\fBudevadm hwdb \fR\fB[options]\fR +.HP \w'\fBudevadm\ test\ \fR\fB[options]\fR\fB\ \fR\fB\fIdevpath\fR\fR\ 'u +\fBudevadm test \fR\fB[options]\fR\fB \fR\fB\fIdevpath\fR\fR +.HP \w'\fBudevadm\ test\-builtin\ \fR\fB[options]\fR\fB\ \fR\fB\fIcommand\fR\fR\fB\ \fR\fB\fIdevpath\fR\fR\ 'u +\fBudevadm test\-builtin \fR\fB[options]\fR\fB \fR\fB\fIcommand\fR\fR\fB \fR\fB\fIdevpath\fR\fR +.SH "DESCRIPTION" +.PP +udevadm expects a command and command specific options\&. It controls the runtime behavior of udev, requests kernel events, manages the event queue, and provides simple debugging mechanisms\&. +.SH "OPTIONS" +.PP +\fB\-\-debug\fR +.RS 4 +Print debug messages to stderr\&. +.RE +.PP +\fB\-\-version\fR +.RS 4 +Print version number\&. +.RE +.PP +\fB\-\-help\fR +.RS 4 +Print help text\&. +.RE +.SS "udevadm info \fIoptions\fR" +.PP +Queries the udev database for device information stored in the udev database\&. It can also query the properties of a device from its sysfs representation to help creating udev rules that match this device\&. +.PP +\fB\-\-query=\fR\fB\fItype\fR\fR +.RS 4 +Query the database for specified type of device data\&. It needs the +\fB\-\-path\fR +or +\fB\-\-name\fR +to identify the specified device\&. Valid queries are: +\fBname\fR, +\fBsymlink\fR, +\fBpath\fR, +\fBproperty\fR, +\fBall\fR\&. +.RE +.PP +\fB\-\-path=\fR\fB\fIdevpath\fR\fR +.RS 4 +The devpath of the device to query\&. +.RE +.PP +\fB\-\-name=\fR\fB\fIfile\fR\fR +.RS 4 +The name of the device node or a symlink to query +.RE +.PP +\fB\-\-root\fR +.RS 4 +Print absolute paths in +\fBname\fR +or +\fBsymlink\fR +query\&. +.RE +.PP +\fB\-\-attribute\-walk\fR +.RS 4 +Print all sysfs properties of the specified device that can be used in udev rules to match the specified device\&. It prints all devices along the chain, up to the root of sysfs that can be used in udev rules\&. +.RE +.PP +\fB\-\-export\fR +.RS 4 +Print output as key/value pairs\&. Values are enclosed in single quotes\&. +.RE +.PP +\fB\-\-export\-prefix=\fR\fB\fIname\fR\fR +.RS 4 +Add a prefix to the key name of exported values\&. +.RE +.PP +\fB\-\-device\-id\-of\-file=\fR\fB\fIfile\fR\fR +.RS 4 +Print major/minor numbers of the underlying device, where the file lives on\&. +.RE +.PP +\fB\-\-export\-db\fR +.RS 4 +Export the content of the udev database\&. +.RE +.PP +\fB\-\-cleanup\-db\fR +.RS 4 +Cleanup the udev database\&. +.RE +.PP +\fB\-\-version\fR +.RS 4 +Print version\&. +.RE +.PP +\fB\-\-help\fR +.RS 4 +Print help text\&. +.RE +.SS "udevadm trigger [options]" +.PP +Request device events from the kernel\&. Primarily used to replay events at system coldplug time\&. +.PP +\fB\-\-verbose\fR +.RS 4 +Print the list of devices which will be triggered\&. +.RE +.PP +\fB\-\-dry\-run\fR +.RS 4 +Do not actually trigger the event\&. +.RE +.PP +\fB\-\-type=\fR\fB\fItype\fR\fR +.RS 4 +Trigger a specific type of devices\&. Valid types are: +\fBdevices\fR, +\fBsubsystems\fR\&. The default value is +\fBdevices\fR\&. +.RE +.PP +\fB\-\-action=\fR\fB\fIaction\fR\fR +.RS 4 +Type of event to be triggered\&. The default value is +\fBchange\fR\&. +.RE +.PP +\fB\-\-subsystem\-match=\fR\fB\fIsubsystem\fR\fR +.RS 4 +Trigger events for devices which belong to a matching subsystem\&. This option can be specified multiple times and supports shell style pattern matching\&. +.RE +.PP +\fB\-\-subsystem\-nomatch=\fR\fB\fIsubsystem\fR\fR +.RS 4 +Do not trigger events for devices which belong to a matching subsystem\&. This option can be specified multiple times and supports shell style pattern matching\&. +.RE +.PP +\fB\-\-attr\-match=\fR\fB\fIattribute\fR\fR\fB=\fR\fB\fIvalue\fR\fR +.RS 4 +Trigger events for devices with a matching sysfs attribute\&. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching\&. If no value is specified, the existence of the sysfs attribute is checked\&. This option can be specified multiple times\&. +.RE +.PP +\fB\-\-attr\-nomatch=\fR\fB\fIattribute\fR\fR\fB=\fR\fB\fIvalue\fR\fR +.RS 4 +Do not trigger events for devices with a matching sysfs attribute\&. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching\&. If no value is specified, the existence of the sysfs attribute is checked\&. This option can be specified multiple times\&. +.RE +.PP +\fB\-\-property\-match=\fR\fB\fIproperty\fR\fR\fB=\fR\fB\fIvalue\fR\fR +.RS 4 +Trigger events for devices with a matching property value\&. This option can be specified multiple times and supports shell style pattern matching\&. +.RE +.PP +\fB\-\-tag\-match=\fR\fB\fIproperty\fR\fR +.RS 4 +Trigger events for devices with a matching tag\&. This option can be specified multiple times\&. +.RE +.PP +\fB\-\-sysname\-match=\fR\fB\fIname\fR\fR +.RS 4 +Trigger events for devices with a matching sys device name\&. This option can be specified multiple times and supports shell style pattern matching\&. +.RE +.PP +\fB\-\-parent\-match=\fR\fB\fIsyspath\fR\fR +.RS 4 +Trigger events for all children of a given device\&. +.RE +.SS "udevadm settle [options]" +.PP +Watches the udev event queue, and exits if all current events are handled\&. +.PP +\fB\-\-timeout=\fR\fB\fIseconds\fR\fR +.RS 4 +Maximum number of seconds to wait for the event queue to become empty\&. The default value is 120 seconds\&. A value of 0 will check if the queue is empty and always return immediately\&. +.RE +.PP +\fB\-\-seq\-start=\fR\fB\fIseqnum\fR\fR +.RS 4 +Wait only for events after the given sequence number\&. +.RE +.PP +\fB\-\-seq\-end=\fR\fB\fIseqnum\fR\fR +.RS 4 +Wait only for events before the given sequence number\&. +.RE +.PP +\fB\-\-exit\-if\-exists=\fR\fB\fIfile\fR\fR +.RS 4 +Stop waiting if file exists\&. +.RE +.PP +\fB\-\-quiet\fR +.RS 4 +Do not print any output, like the remaining queue entries when reaching the timeout\&. +.RE +.PP +\fB\-\-help\fR +.RS 4 +Print help text\&. +.RE +.SS "udevadm control \fIcommand\fR" +.PP +Modify the internal state of the running udev daemon\&. +.PP +\fB\-\-exit\fR +.RS 4 +Signal and wait for udevd to exit\&. +.RE +.PP +\fB\-\-log\-priority=\fR\fB\fIvalue\fR\fR +.RS 4 +Set the internal log level of udevd\&. Valid values are the numerical syslog priorities or their textual representations: +\fBerr\fR, +\fBinfo\fR +and +\fBdebug\fR\&. +.RE +.PP +\fB\-\-stop\-exec\-queue\fR +.RS 4 +Signal udevd to stop executing new events\&. Incoming events will be queued\&. +.RE +.PP +\fB\-\-start\-exec\-queue\fR +.RS 4 +Signal udevd to enable the execution of events\&. +.RE +.PP +\fB\-\-reload\fR +.RS 4 +Signal udevd to reload the rules files and other databases like the kernel module index\&. Reloading rules and databases does not apply any changes to already existing devices; the new configuration will only be applied to new events\&. +.RE +.PP +\fB\-\-property=\fR\fB\fIKEY\fR\fR\fB=\fR\fB\fIvalue\fR\fR +.RS 4 +Set a global property for all events\&. +.RE +.PP +\fB\-\-children\-max=\fR\fIvalue\fR +.RS 4 +Set the maximum number of events, udevd will handle at the same time\&. +.RE +.PP +\fB\-\-timeout=\fR\fIseconds\fR +.RS 4 +The maximum number of seconds to wait for a reply from udevd\&. +.RE +.PP +\fB\-\-help\fR +.RS 4 +Print help text\&. +.RE +.SS "udevadm monitor [options]" +.PP +Listens to the kernel uevents and events sent out by a udev rule and prints the devpath of the event to the console\&. It can be used to analyze the event timing, by comparing the timestamps of the kernel uevent and the udev event\&. +.PP +\fB\-\-kernel\fR +.RS 4 +Print the kernel uevents\&. +.RE +.PP +\fB\-\-udev\fR +.RS 4 +Print the udev event after the rule processing\&. +.RE +.PP +\fB\-\-property\fR +.RS 4 +Also print the properties of the event\&. +.RE +.PP +\fB\-\-subsystem\-match=\fR\fB\fIstring[/string]\fR\fR +.RS 4 +Filter events by subsystem[/devtype]\&. Only udev events with a matching subsystem value will pass\&. +.RE +.PP +\fB\-\-tag\-match=\fR\fB\fIstring\fR\fR +.RS 4 +Filter events by property\&. Only udev events with a given tag attached will pass\&. +.RE +.PP +\fB\-\-help\fR +.RS 4 +Print help text\&. +.RE +.SS "udevadm hwdb [options]" +.PP +Maintain the hardware database index in +/etc/udev/hwdb\&.bin\&. +.PP +\fB\-\-update\fR +.RS 4 +Compile the hardware database information located in /usr/lib/udev/hwdb\&.d/, /etc/udev/hwdb\&.d/ and store it in +/etc/udev/hwdb\&.bin\&. This should be done after any update to the source files; it will not be called automatically\&. The running udev daemon will detect a new database on its own and does not need to be notified about it\&. +.RE +.PP +\fB\-\-test=\fR\fB\fIstring\fR\fR +.RS 4 +Query the database with a modalias string, and print the retrieved properties\&. +.RE +.PP +\fB\-\-root=\fR\fB\fIstring\fR\fR +.RS 4 +Alternative root path in the filesystem for reading and writing files\&. +.RE +.SS "udevadm test [options] \fIdevpath\fR" +.PP +Simulate a udev event run for the given device, and print debug output\&. +.PP +\fB\-\-action=\fR\fB\fIstring\fR\fR +.RS 4 +The action string\&. +.RE +.PP +\fB\-\-subsystem=\fR\fB\fIstring\fR\fR +.RS 4 +The subsystem string\&. +.RE +.PP +\fB\-\-help\fR +.RS 4 +Print help text\&. +.RE +.SS "udevadm test\-builtin [options] \fIcommand\fR \fIdevpath\fR" +.PP +Run a built\-in command for the given device, and print debug output\&. +.PP +\fB\-\-help\fR +.RS 4 +Print help text\&. +.RE +.SH "SEE ALSO" +.PP +\fBudev\fR(7) +\fBudevd.service\fR(8) diff --git a/udev-lfs/udevd.8 b/udev-lfs/udevd.8 index 12010da8e..94d93dcc1 100644 --- a/udev-lfs/udevd.8 +++ b/udev-lfs/udevd.8 @@ -1,16 +1,5 @@ -.\" Title: systemd-udevd.service -.\" Author: Kay Sievers -.\" Generator: DocBook XSL Stylesheets v1.77.1 -.\" Date: 07/20/2012 -.\" Manual: systemd-udevd.service -.\" Source: systemd -.\" Language: English -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" Manually updated for udev only for LFS by BRuce Dubbs -.\" -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" -.TH "UDEVD" "8" "" "systemd (LFS modified man page)" "udevd" +'\" t +.TH "SYSTEMD\-UDEVD\&.SERVICE" "8" "" "systemd 199" "udevd" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -33,12 +22,12 @@ .SH "NAME" udevd \- Device event managing daemon .SH "SYNOPSIS" -.PP .HP \w'\fB/usr/lib/udevd\fR\ 'u -\fB/lib/udev/udevd\fR [\fB\-\-daemon\fR] [\fB\-\-debug\fR] [\fB\-\-children\-max=\fR] [\fB\-\-exec\-delay=\fR] \ [\fB\-\-resolve\-names=early|late|never\fR] [\fB\-\-version\fR] [\fB\-\-help\fR] +\fB/lib/udev/udevd\fR [\fB\-\-daemon\fR] [\fB\-\-debug\fR] [\fB\-\-children\-max=\fR] [\fB\-\-exec\-delay=\fR] [\fB\-\-resolve\-names=early|late|never\fR] [\fB\-\-version\fR] [\fB\-\-help\fR] .SH "DESCRIPTION" .PP -udevd listens to kernel uevents\&. For every event, udevd executes matching instructions specified in udev rules\&. See +\fBudevd\fR +listens to kernel uevents\&. For every event, udevd executes matching instructions specified in udev rules\&. See \fBudev\fR(7)\&. .PP The behavior of the running daemon can be changed with @@ -57,12 +46,12 @@ Print debug messages to stderr\&. .PP \fB\-\-children\-max=\fR .RS 4 -Limit the number of parallel executed events\&. +Limit the number of events executed in parallel\&. .RE .PP \fB\-\-exec\-delay=\fR .RS 4 -Number of seconds to delay the execution of RUN instructions\&. This might be useful when debugging system crashes during coldplug cause by loading non\-working kernel modules\&. +Delay the execution of RUN instruction by the given number of seconds\&. This option might be useful when debugging system crashes during coldplug caused by loading non\-working kernel modules\&. .RE .PP \fB\-\-resolve\-names=\fR @@ -87,13 +76,15 @@ Print help text\&. .RE .SH "ENVIRONMENT" .PP -\fIUDEV_LOG=\fR +\fI$UDEV_LOG=\fR .RS 4 Set the logging priority\&. .RE .SH "KERNEL COMMAND LINE" .PP -The parameters starting with "rd\&.", will be read when udev is used in an initrd\&. +Parameters starting with "rd\&." will be read when +\fBudevd\fR +is used in an initrd\&. .PP \fIudev\&.log\-priority=\fR, \fIrd\&.udev\&.log\-priority=\fR .RS 4 @@ -102,12 +93,30 @@ Set the logging priority\&. .PP \fIudev\&.children\-max=\fR, \fIrd\&.udev\&.children\-max=\fR .RS 4 -Limit the number of parallel executed events\&. +Limit the number of events executed in parallel\&. .RE .PP \fIudev\&.exec\-delay=\fR, \fIrd\&.udev\&.exec\-delay=\fR .RS 4 -Number of seconds to delay the execution of RUN instructions\&. This might be useful when debugging system crashes during coldplug cause by loading non\-working kernel modules\&. +Delay the execution of RUN instruction by the given number of seconds\&. This option might be useful when debugging system crashes during coldplug caused by loading non\-working kernel modules\&. +.RE +.PP +\fInet\&.ifnames=\fR +.RS 4 +Network interfaces are renamed to give them predictable names when possible\&. It is enabled by default, specifying 0 disables it\&. +.RE +.SH "CONFIGURATION FILE" +.PP +udev expects its main configuration file at +/etc/udev/udev\&.conf\&. It consists of a set of variables allowing the user to override default udev values\&. All empty lines or lines beginning with \*(Aq#\*(Aq are ignored\&. The following variables can be set: +.PP +\fIudev_log\fR +.RS 4 +The logging priority\&. Valid values are the numerical syslog priorities or their textual representations: +\fBerr\fR, +\fBinfo\fR +and +\fBdebug\fR\&. .RE .SH "SEE ALSO" .PP