diff options
author | mananth <mananth> | 2004-02-04 10:51:50 +0000 |
---|---|---|
committer | mananth <mananth> | 2004-02-04 10:51:50 +0000 |
commit | 6cbd7ae67a04b1f0c3269ab3aae2d8ee0efa5a89 (patch) | |
tree | ab728dfb40bed686bf802e7e92545e02ea8131b6 /lib/sysfs_driver.c | |
parent | 06d8ed8e147b05fd41c4ba0a36b7c67760d181a9 (diff) | |
download | sysfsutils-6cbd7ae67a04b1f0c3269ab3aae2d8ee0efa5a89.tar.gz |
Sorting support, removed unneeded functions and other cosmetic changes
Diffstat (limited to 'lib/sysfs_driver.c')
-rw-r--r-- | lib/sysfs_driver.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sysfs_driver.c b/lib/sysfs_driver.c index 636219a..6a7cf68 100644 --- a/lib/sysfs_driver.c +++ b/lib/sysfs_driver.c @@ -178,7 +178,7 @@ struct sysfs_attribute *sysfs_get_driver_attr(struct sysfs_driver *drv, } attrlist = sysfs_get_driver_attributes(drv); - if (attrlist != NULL) + if (attrlist == NULL) return NULL; return sysfs_get_directory_attribute(drv->directory, @@ -244,7 +244,8 @@ struct dlist *sysfs_get_driver_devices(struct sysfs_driver *driver) driver->devices = dlist_new_with_delete (sizeof(struct sysfs_device), sysfs_close_driver_device); - dlist_unshift(driver->devices, device); + dlist_unshift_sorted(driver->devices, device, + sort_list); } } return (driver->devices); |