diff options
-rw-r--r-- | include/libsysfs.h | 1 | ||||
-rw-r--r-- | lib/sysfs_device.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/libsysfs.h b/include/libsysfs.h index 3835866..819959e 100644 --- a/include/libsysfs.h +++ b/include/libsysfs.h @@ -88,6 +88,7 @@ struct sysfs_device { struct dlist *children; unsigned char name[SYSFS_NAME_LEN]; unsigned char bus_id[SYSFS_NAME_LEN]; + unsigned char path[SYSFS_PATH_MAX]; unsigned char driver_name[SYSFS_NAME_LEN]; /* for internal use only */ diff --git a/lib/sysfs_device.c b/lib/sysfs_device.c index e212056..635ba64 100644 --- a/lib/sysfs_device.c +++ b/lib/sysfs_device.c @@ -142,6 +142,7 @@ struct sysfs_device *sysfs_open_device(const unsigned char *path) } dev->directory = sdir; strcpy(dev->bus_id, sdir->name); + strcpy(dev->path, sdir->path); /* * The "name" attribute no longer exists... return the device's |