chiark / gitweb /
libudev: udev_device_get_devname -> udev_device_get_devnode
[elogind.git] / udev / lib / libudev-device.c
index 782d6625497675430894d03908b585a546413b03..731230efd0143858bd9da1072d60696fdbd6fd46 100644 (file)
@@ -17,8 +17,6 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
@@ -363,7 +361,7 @@ const char *udev_device_get_sysname(struct udev_device *udev_device)
 }
 
 /**
- * udev_device_get_devname:
+ * udev_device_get_devnode:
  * @udev_device: udev device
  *
  * Retrieve the device node file name belonging to the udev device.
@@ -371,7 +369,7 @@ const char *udev_device_get_sysname(struct udev_device *udev_device)
  *
  * Returns: the device node file name of the udev device, or #NULL if no device node exists
  **/
-const char *udev_device_get_devname(struct udev_device *udev_device)
+const char *udev_device_get_devnode(struct udev_device *udev_device)
 {
        if (udev_device == NULL)
                return NULL;
@@ -397,7 +395,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;
        }