summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-09-17 23:58:38 -0700
committerKay Sievers <kay.sievers@vrfy.org>2008-09-17 23:58:38 -0700
commit279595bd1af86db92b063ac8b70c7ef51c67363c (patch)
treef988fd3d404ff419f3f41a3559c7354ecf6ccdcf
parenta076080bd43d55f0d4eabc9bef2bf46c9791372f (diff)
libudev: fix "subsystem" value
-rw-r--r--TODO1
-rw-r--r--udev/lib/libudev-device.c2
-rw-r--r--udev/lib/libudev-util.c1
3 files changed, 3 insertions, 1 deletions
diff --git a/TODO b/TODO
index bbb585b002..325341864a 100644
--- 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
diff --git a/udev/lib/libudev-device.c b/udev/lib/libudev-device.c
index 782d662549..76ef298a34 100644
--- a/udev/lib/libudev-device.c
+++ b/udev/lib/libudev-device.c
@@ -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;
}
diff --git a/udev/lib/libudev-util.c b/udev/lib/libudev-util.c
index 7053a2f825..6ec835e624 100644
--- a/udev/lib/libudev-util.c
+++ b/udev/lib/libudev-util.c
@@ -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);
}