From fe350a758556ee85bf87ca716d80eb3c0267ec54 Mon Sep 17 00:00:00 2001 From: mananth Date: Fri, 17 Oct 2003 12:38:48 +0000 Subject: Include "path" in sysfs_device --- include/libsysfs.h | 1 + lib/sysfs_device.c | 1 + 2 files changed, 2 insertions(+) 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 -- cgit v1.2.1