diff options
author | mananth <mananth> | 2004-12-16 04:49:33 +0000 |
---|---|---|
committer | mananth <mananth> | 2004-12-16 04:49:33 +0000 |
commit | aaef7202817ad1a75f9d2baf0c5d6c2d820d1fed (patch) | |
tree | 24005772e49c9973e40af93cf5b2350a7e5f0b95 | |
parent | 79da2f822769a0d78d5cc4a15468bec8cd8bc1f4 (diff) | |
download | sysfsutils-aaef7202817ad1a75f9d2baf0c5d6c2d820d1fed.tar.gz |
Patch from Kay - fix sysfs_get_classdev_attr().
-rw-r--r-- | CREDITS | 3 | ||||
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/sysfs_class.c | 3 |
3 files changed, 10 insertions, 0 deletions
@@ -29,3 +29,6 @@ have made contributions: - Supplied patch to fix SEGV in dlist.c o Arun Bhanu <arun@codemovers.org> - Supplied patch to fix docs/libsysfs.txt + o Kay Sievers <kay.sievers@vrfy.org> + - Supplied patch to fix sysfs_get_classdir_attr when + the directory vanishes from under us. @@ -1,4 +1,8 @@ +12/16/2004 - Kay Sievers <kay.sievers@vrfy.org> + * Fix sysfs_get_classdev_attr() for case when the + sysfs_directory vanishes from beneath us + 11/18/2004 - Daniel Stekloff <dsteklof@us.ibm.com> * Check "driver" link under the device dir before taking the "brute-force" route diff --git a/lib/sysfs_class.c b/lib/sysfs_class.c index db59aef..a132bb6 100644 --- a/lib/sysfs_class.c +++ b/lib/sysfs_class.c @@ -640,6 +640,9 @@ struct sysfs_attribute *sysfs_get_classdev_attr return cur; } + if (clsdev->directory == NULL) + return NULL; + if (clsdev->directory->subdirs == NULL) if ((sysfs_read_dir_subdirs(clsdev->directory)) != 0 || clsdev->directory->subdirs == NULL) |