From 254efc14a40204969fcf861498fb8b62a16141d1 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sun, 13 Aug 2006 05:32:09 +0200 Subject: udevd: read DRIVER from the environment --- udev_sysfs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'udev_sysfs.c') diff --git a/udev_sysfs.c b/udev_sysfs.c index ddc0b467..85ea4d15 100644 --- a/udev_sysfs.c +++ b/udev_sysfs.c @@ -79,13 +79,16 @@ void sysfs_cleanup(void) } } -void sysfs_device_set_values(struct sysfs_device *dev, const char *devpath, const char *subsystem) +void sysfs_device_set_values(struct sysfs_device *dev, const char *devpath, + const char *subsystem, const char *driver) { char *pos; strlcpy(dev->devpath, devpath, sizeof(dev->devpath)); if (subsystem != NULL) strlcpy(dev->subsystem, subsystem, sizeof(dev->subsystem)); + if (driver != NULL) + strlcpy(dev->driver, driver, sizeof(dev->driver)); /* set kernel name */ pos = strrchr(dev->devpath, '/'); @@ -181,7 +184,7 @@ struct sysfs_device *sysfs_device_get(const char *devpath) return NULL; memset(dev, 0x00, sizeof(struct sysfs_device)); - sysfs_device_set_values(dev, devpath_real, NULL); + sysfs_device_set_values(dev, devpath_real, NULL, NULL); /* get subsystem */ if (strncmp(dev->devpath, "/class/", 7) == 0) { -- cgit 1.2.3-korg