chiark / gitweb /
udevadm: test - print list of properties
authorKay Sievers <kay.sievers@vrfy.org>
Thu, 2 Jul 2009 20:56:19 +0000 (22:56 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Thu, 2 Jul 2009 20:56:19 +0000 (22:56 +0200)
libudev/libudev-device.c
udev/udevadm-test.c

index 951f78aa5c7a7f9d3838bae78bab911d0eb55e67..7644e6c63d26ad192b704665d2b835268f03b127 100644 (file)
@@ -961,7 +961,7 @@ unsigned long long int udev_device_get_seqnum(struct udev_device *udev_device)
  * @udev_device: udev device
  * @sysattr: attribute name
  *
  * @udev_device: udev device
  * @sysattr: attribute name
  *
- * The retrieved value is cached in the device. Repeated reads will return the same
+ * The retrieved value is cached in the device. Repeated calls will return the same
  * value and not open the attribute again.
  *
  * Returns: the content of a sys attribute file, or #NULL if there is no sys attribute value.
  * value and not open the attribute again.
  *
  * Returns: the content of a sys attribute file, or #NULL if there is no sys attribute value.
index e49d52c5f1800b41f8e2990d4950d03957371aad..6c5710380ef06be216fc6c544a6b6e75a0f56b2d 100644 (file)
@@ -38,6 +38,7 @@ int udevadm_test(struct udev *udev, int argc, char *argv[])
        struct udev_event *event;
        struct udev_device *dev;
        struct udev_rules *rules = NULL;
        struct udev_event *event;
        struct udev_device *dev;
        struct udev_rules *rules = NULL;
+       struct udev_list_entry *entry;
        int err;
        int rc = 0;
 
        int err;
        int rc = 0;
 
@@ -115,9 +116,10 @@ int udevadm_test(struct udev *udev, int argc, char *argv[])
        if (udev_device_get_event_timeout(dev) >= 0)
                info(udev, "custom event timeout: %i\n", udev_device_get_event_timeout(dev));
 
        if (udev_device_get_event_timeout(dev) >= 0)
                info(udev, "custom event timeout: %i\n", udev_device_get_event_timeout(dev));
 
-       if (err == 0 && !event->ignore_device && udev_get_run(udev)) {
-               struct udev_list_entry *entry;
+       udev_list_entry_foreach(entry, udev_device_get_properties_list_entry(dev))
+               info(udev, "%s=%s\n", udev_list_entry_get_name(entry), udev_list_entry_get_value(entry));
 
 
+       if (err == 0 && !event->ignore_device && udev_get_run(udev)) {
                udev_list_entry_foreach(entry, udev_list_get_entry(&event->run_list)) {
                        char program[UTIL_PATH_SIZE];
 
                udev_list_entry_foreach(entry, udev_list_get_entry(&event->run_list)) {
                        char program[UTIL_PATH_SIZE];