]> err.no Git - systemd/commitdiff
libudev: enumerate_get_devices_list -> enumerate_get_list
authorKay Sievers <kay.sievers@vrfy.org>
Fri, 26 Sep 2008 17:41:50 +0000 (19:41 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Fri, 26 Sep 2008 17:41:50 +0000 (19:41 +0200)
TODO
udev/lib/exported_symbols
udev/lib/libudev-device.c
udev/lib/libudev-enumerate.c
udev/lib/libudev.h
udev/lib/test-libudev.c
udev/udevadm-info.c

diff --git a/TODO b/TODO
index 17baf6351ebbb54a953ef800c05d88a8ff1e6685..b61b7524071fcc54627380c779837a2e98b287fb 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,10 +1,11 @@
   o enumerate() - add buses and drivers
   o increase ressize buffer
+
   o lazy loading of "uevent" and db
+  o lazy init of selinux
 
   o add DVB variables to kernel, and drop shell script rule
   o add watershed extra
-  o lazy init of selinux
   o replace list.h with ccan list.h which is gpl-v2-or-later version
   o get all distros to agree on a default set of rules
   o rework rules to a match-action list, instead of a rules array
index e46aecbd37726059cc1dd62d774ab0594d1d0d46..9650ef4d983f381dba6e4935f2829a1722ad3902 100644 (file)
@@ -33,7 +33,7 @@ udev_device_get_attr_value
 udev_enumerate_new_from_subsystems
 udev_enumerate_ref
 udev_enumerate_unref
-udev_enumerate_get_devices_list
+udev_enumerate_get_list
 udev_monitor_new_from_socket
 udev_monitor_new_from_netlink
 udev_monitor_enable_receiving
index 359ae443dab2ec6059c66110a22e63b69dd7f60c..6c6b1d387c515794bd129ffeb862d957c0bb6106 100644 (file)
@@ -118,7 +118,6 @@ static int device_read_db(struct udev_device *udev_device)
                char target[UTIL_PATH_SIZE];
                int target_len;
 
-               info(udev_device->udev, "found a symlink as db file\n");
                target_len = readlink(filename, target, sizeof(target));
                if (target_len > 0)
                        target[target_len] = '\0';
@@ -126,9 +125,9 @@ static int device_read_db(struct udev_device *udev_device)
                        info(udev_device->udev, "error reading db link %s: %s\n", filename, strerror(errno));
                        return -1;
                }
-               dbg(udev_device->udev, "db link points to '%s'\n", target);
                if (asprintf(&udev_device->devname, "%s/%s", udev_get_dev_path(udev_device->udev), target) < 0)
                        return -ENOMEM;
+               info(udev_device->udev, "device %p filled with db symlink data '%s'\n", udev_device, udev_device->devname);
                return 0;
        }
 
@@ -176,7 +175,7 @@ static int device_read_db(struct udev_device *udev_device)
        }
        fclose(f);
 
-       info(udev_device->udev, "device %p filled with udev database data\n", udev_device);
+       info(udev_device->udev, "device %p filled with db file data\n", udev_device);
        return 0;
 }
 
@@ -272,7 +271,7 @@ struct udev_device *udev_device_new_from_devnum(struct udev *udev, char type, de
        enumerate = udev_enumerate_new_from_subsystems(udev, NULL);
        if (enumerate == NULL)
                return NULL;
-       list = udev_enumerate_get_devices_list(enumerate);
+       list = udev_enumerate_get_list(enumerate);
        while (list != NULL) {
                struct udev_device *device_loop;
 
index 80df8bd72d8d1adc5976200f5a34910f19c8b574..6d638670c95acc30234fa04375f1e7c732a09ef2 100644 (file)
@@ -54,7 +54,7 @@ void udev_enumerate_unref(struct udev_enumerate *udev_enumerate)
        free(udev_enumerate);
 }
 
-struct udev_list *udev_enumerate_get_devices_list(struct udev_enumerate *udev_enumerate)
+struct udev_list *udev_enumerate_get_list(struct udev_enumerate *udev_enumerate)
 {
        if (udev_enumerate == NULL)
                return NULL;
index 014b53175be03291740a47b2105ae36aa79a4b91..d2e57d4183e97ddc010c00c508b23b814707e834 100644 (file)
@@ -83,7 +83,7 @@ extern const char *udev_device_get_attr_value(struct udev_device *udev_device, c
 extern struct udev_enumerate *udev_enumerate_new_from_subsystems(struct udev *udev, const char *subsystem);
 extern struct udev_enumerate *udev_enumerate_ref(struct udev_enumerate *udev_enumerate);
 extern void udev_enumerate_unref(struct udev_enumerate *udev_enumerate);
-extern struct udev_list *udev_enumerate_get_devices_list(struct udev_enumerate *udev_enumerate);
+extern struct udev_list *udev_enumerate_get_list(struct udev_enumerate *udev_enumerate);
 
 /* udev and kernel device events */
 extern struct udev_monitor *udev_monitor_new_from_socket(struct udev *udev, const char *socket_path);
index 421d0511a122e2d2361b974dee773847bbc301e5..19968a1738e71fc1b918c3123eaea2a9d13f96c4 100644 (file)
@@ -150,7 +150,7 @@ static int test_enumerate(struct udev *udev, const char *subsystem)
        enumerate = udev_enumerate_new_from_subsystems(udev, NULL);
        if (enumerate == NULL)
                return -1;
-       list = udev_enumerate_get_devices_list(enumerate);
+       list = udev_enumerate_get_list(enumerate);
        while (list != NULL) {
                struct udev_device *device;
 
index 6a0425769f4069399fdd4717f3a1c7a1f78600f2..2f41b7adf77cd7bb9165fbbe17c639cc28467695 100644 (file)
@@ -192,7 +192,7 @@ static int export_devices(struct udev *udev)
        enumerate = udev_enumerate_new_from_subsystems(udev, NULL);
        if (enumerate == NULL)
                return -1;
-       list = udev_enumerate_get_devices_list(enumerate);
+       list = udev_enumerate_get_list(enumerate);
        while (list != NULL) {
                struct udev_device *device;
 
@@ -375,18 +375,18 @@ int udevadm_info(struct udev *udev, int argc, char *argv[])
                        goto exit;
                case 'h':
                        printf("Usage: udevadm info OPTIONS\n"
-                              "  --query=<type>             query database for the specified value:\n"
+                              "  --query=<type>             query device information:\n"
                               "      name                     name of device node\n"
                               "      symlink                  pointing to node\n"
-                              "      path                     sysfs device path\n"
+                              "      path                     sys device path\n"
                               "      env                      the device related imported environment\n"
                               "      all                      all values\n"
-                              "  --path=<devpath>           sysfs device path used for query or chain\n"
-                              "  --name=<name>              node or symlink name used for query\n"
-                              "  --root                     prepend to query result or print udev_root\n"
-                              "  --attribute-walk           print all key matches while walking along chain\n"
+                              "  --path=<syspath>           sys device path used for query or attribute walk\n"
+                              "  --name=<name>              node or symlink name used for query or attribute walk\n"
+                              "  --root                     prepend dev directory to path names\n"
+                              "  --attribute-walk           print all key matches while walking along the chain\n"
                               "                             of parent devices\n"
-                              "  --device-id-of-file=<file> print major/minor of underlying device\n"
+                              "  --device-id-of-file=<file> print major:minor of device containing this file\n"
                               "  --export-db                export the content of the udev database\n"
                               "  --help                     print this text\n"
                               "\n");