]> err.no Git - systemd/commitdiff
libudev: fix "subsystem" value
authorKay Sievers <kay.sievers@vrfy.org>
Thu, 18 Sep 2008 06:58:38 +0000 (23:58 -0700)
committerKay Sievers <kay.sievers@vrfy.org>
Thu, 18 Sep 2008 06:58:38 +0000 (23:58 -0700)
TODO
udev/lib/libudev-device.c
udev/lib/libudev-util.c

diff --git a/TODO b/TODO
index bbb585b0027c9afff8639521f203a906a21e7074..325341864a7d858b0ea4420e64741673e66aa172 100644 (file)
--- a/TODO
+++ b/TODO
@@ -12,3 +12,4 @@ These things will change in future udev versions:
 
 before next release:
   o replace list.h with gpl or later version
+  o increase ressize buffer
index 782d6625497675430894d03908b585a546413b03..76ef298a3420aec4b0f9fbb3ae4973c6b83aa02c 100644 (file)
@@ -397,7 +397,7 @@ const char *udev_device_get_subsystem(struct udev_device *udev_device)
                return udev_device->subsystem;
 
        /* read "subsytem" link */
-       if (util_get_sys_subsystem(udev_device->udev, udev_device->syspath, subsystem, sizeof(subsystem)) == 0) {
+       if (util_get_sys_subsystem(udev_device->udev, udev_device->syspath, subsystem, sizeof(subsystem)) > 0) {
                udev_device->subsystem = strdup(subsystem);
                return udev_device->subsystem;
        }
index 7053a2f82554726508bd39110f526233b7a1259d..6ec835e62445695dc05a4432819e6a09102f5007 100644 (file)
@@ -50,6 +50,7 @@ static ssize_t get_sys_link(struct udev *udev, const char *slink, const char *sy
        if (pos == NULL)
                return -1;
        pos = &pos[1];
+       info(udev, "resolved link to: '%s'\n", pos);
        return util_strlcpy(subsystem, pos, size);
 }