summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormananth <mananth>2003-12-04 06:12:55 +0000
committermananth <mananth>2003-12-04 06:12:55 +0000
commitca17402a6ad611da0983a1a69606c233894dcac2 (patch)
treef07168ea949df7711870be60a194fb2d637355ff
parent9da20ce9c84e0e91530afeb538e1402c5b8129e5 (diff)
downloadsysfsutils-ca17402a6ad611da0983a1a69606c233894dcac2.tar.gz
Corrected sysfs_get_directory_attribute()
-rw-r--r--ChangeLog3
-rw-r--r--lib/sysfs_dir.c12
2 files changed, 9 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 036b5df..ad9ad34 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
+12/02/2003 - Ananth Mavinakayanahalli <ananth@in.ibm.com>
+ * Corrected sysfs_get_directory_attribute()
+
12/01/2003 - Ananth Mavinakayanahalli <ananth@in.ibm.com>
* Removed usage of _DIR #defines
* Added functionality to obtain parent of a class device
diff --git a/lib/sysfs_dir.c b/lib/sysfs_dir.c
index beed52a..f3c683d 100644
--- a/lib/sysfs_dir.c
+++ b/lib/sysfs_dir.c
@@ -642,14 +642,14 @@ struct sysfs_attribute *sysfs_get_directory_attribute
}
if (dir->attributes == NULL) {
- if ((sysfs_read_dir_attributes(dir)) != 0) {
+ if ((sysfs_read_dir_attributes(dir)) != 0)
return NULL;
- }
- attr = (struct sysfs_attribute *)dlist_find_custom
- (dir->attributes, attrname, dir_attribute_name_equal);
- if (attr != NULL)
- return attr;
}
+
+ attr = (struct sysfs_attribute *)dlist_find_custom
+ (dir->attributes, attrname, dir_attribute_name_equal);
+ if (attr != NULL)
+ return attr;
if (dir->subdirs != NULL) {
dlist_for_each_data(dir->subdirs, sdir,