From 237bf36e664db92f95b75067bf0f246726993254 Mon Sep 17 00:00:00 2001 From: mohanltc Date: Wed, 23 Aug 2006 07:37:02 +0000 Subject: 2.1.0 Release --- ChangeLog | 12 ++++++++++ README | 2 +- docs/libsysfs.txt | 69 ++++++++++++++++++++++++++++++++++++++++++------------- test/Makefile.am | 2 +- 4 files changed, 67 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index e060c1f..0027701 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +18/07/2006 - Mohan Kumar M + * Add subsystem in sysfs_device + +07/07/2006 - Mohan Kumar M + * Add C++ compilation suport + +28/06/2006 - Mohan Kumar M + * Add sysfs_open_device_tree() + +17/04/2006 - Mohan Kumar M + * Add sysfs_open_link_list() + 12/07/2005 - Mohan Kumar M * Minor code cleanup in sysfs_class.c to conform to C99 diff --git a/README b/README index 776d872..6deefcf 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ - Sysfs Utilities Package - Includes Libsysfs(v. 2.0.0) + Sysfs Utilities Package - Includes Libsysfs(v. 2.1.0) ====================================================== Contents diff --git a/docs/libsysfs.txt b/docs/libsysfs.txt index c061eb5..7ab1147 100644 --- a/docs/libsysfs.txt +++ b/docs/libsysfs.txt @@ -2,8 +2,8 @@ System Utilities sysfs Library - libsysfs ========================================= -Version: 2.0.0 -November 25, 2005 +Version: 2.1.0 +August 22, 2006 Contents -------- @@ -264,16 +264,17 @@ The sysfs_device structure represents a system device that's exposed in sysfs under the /sys/devices directory structure. struct sysfs_device { - char name[SYSFS_NAME_LEN]; - char path[SYSFS_PATH_MAX]; + char name[SYSFS_NAME_LEN]; + char path[SYSFS_PATH_MAX]; struct dlist *attrlist; - char bus_id[SYSFS_NAME_LEN]; - char bus[SYSFS_NAME_LEN]; - char driver_name[SYSFS_NAME_LEN]; + char bus_id[SYSFS_NAME_LEN]; + char bus[SYSFS_NAME_LEN]; + char driver_name[SYSFS_NAME_LEN]; + char subsystem[SYSFS_NAME_LEN]; - /* Private: for internal use only */ - struct sysfs_device *parent; - struct dlist *children; + /* Private: for internal use only */ + struct sysfs_device *parent; + struct dlist *children; }; The sysfs_device structure contains a "parent" pointer, a list of child @@ -466,6 +467,17 @@ Returns: Directory list on success, NULL on error Prototype: struct dlist *sysfs_open_directory_list(const char *path) ------------------------------------------------------------------------------- +------------------------------------------------------------------------------- +Name: sysfs_open_link_list + +Description: Utility function to get list of all links under path. + +Arguments: const char *path Path to read + +Returns: Links list on success, NULL on error + +Prototype: struct dlist *sysfs_open_link_list(const char *path) +------------------------------------------------------------------------------- 6.3 Attribute Functions ------------------------ @@ -873,6 +885,31 @@ Arguments: sysfs_device *dev Device structure to close Prototype: void sysfs_close_device(struct sysfs_device *dev) ------------------------------------------------------------------------------- +------------------------------------------------------------------------------- +Name: sysfs_open_device_tree + +Description: Function opens up the device tree at the specified path. + +Arguments: const char *path Path at which to open the device tree + +Returns: struct sysfs_device * with success + NULL with error, Errno will be set with error, returning + - EINVAL for invalid arguments + +Prototype: struct sysfs_device *sysfs_open_device_tree(const char *path) +------------------------------------------------------------------------------- + +------------------------------------------------------------------------------- +Name: sysfs_close_device_tree + +Description: Function closes the device tree originating at the given + sysfs_device. + +Arguments: struct sysfs_device *devroot Device from which the device + tree has to be closed + +Prototype: void sysfs_close_device_tree(struct sysfs_device *devroot) +------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Name: sysfs_get_device_parent @@ -1267,7 +1304,7 @@ dlist_sort_custom() expects that the compare function will: 7.3 Custom filtering and sorting using dlist_filter_sort() ---------------------------------------------------------- -As of release 2.0.0, libsysfs provides a new interface for custom filtering +From release 2.0.0, libsysfs provides a new interface for custom filtering and sorting of dlists. This API is similar to scandir() system call. Applications can call this API with the following arguments: the list, pointer to the filter function, pointer to the sorter function as in @@ -1296,10 +1333,10 @@ in the filesystem it represents. Here's a typical order of operation: 9. Testsuite ------------ -Version 2.0.0 of sysfsutils ships with a comprehensive testsuite. The testsuite -shipped as part of the "test" directory of the sysfsutils source package, -results in an executable "testlibsysfs" which will be installed in the -/usr/local/bin directory. Some of the salient features of the testsuite are: +From version 2.0.0 sysfsutils ships with a comprehensive testsuite. The +testsuite shipped as part of the "test" directory of the sysfsutils source +package, results in an executable "testlibsysfs". Some of the salient +features of the testsuite are: a. Tests _every_ API exported by the library. b. Tests are performed for all possible combinations of input parameters. @@ -1319,7 +1356,7 @@ a. Modify the variables libsysfs.conf file to appropriate values for your value for the system under test). -b. Build and install the testsuite. +b. Build testsuite. c. Run the testsuite: diff --git a/test/Makefile.am b/test/Makefile.am index eb23153..953f2df 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,4 +1,4 @@ -bin_PROGRAMS = dlist_test get_device get_driver get_module testlibsysfs +bin_PROGRAMS = dlist_test get_device get_driver get_module BUILT_SOURCES = test.h CLEANFILES = test.h test.h: -- cgit v1.2.1