diff options
author | mananth <mananth> | 2004-09-13 06:28:25 +0000 |
---|---|---|
committer | mananth <mananth> | 2004-09-13 06:28:25 +0000 |
commit | 846ff9c38e4dcee635f949531f56858cef17a139 (patch) | |
tree | d5a8d9eb122bdce214bccd6c249d9aeff9e8f16b | |
parent | a9ac2db48af3a0fabff0b4f31ec32f1ae18737ca (diff) | |
download | sysfsutils-1_2_0.tar.gz |
updated docs/libsysfs.txtsysfsutils-1_2_0
-rw-r--r-- | docs/libsysfs.txt | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/docs/libsysfs.txt b/docs/libsysfs.txt index 831cf26..b877cb8 100644 --- a/docs/libsysfs.txt +++ b/docs/libsysfs.txt @@ -32,7 +32,9 @@ Contents 6.5 Class Functions 6.6 Device Functions 6.7 Driver Functions -7. Navigating a dlist +7. Dlists + 7.1 Navigating a dlist + 7.2 Custom sorting using dlist_sort_custom() 8. Usage 9. Testsuite 10. Conclusion @@ -122,6 +124,11 @@ and files that lie underneath it. To query a device on a PCI bus, one would completed. Besides supplying functions to retrieve devices, the library will also provide some utility functions like getting sysfs mount point. +A paper on Libsysfs was presented at Linux.Conf.Au 2004 (Adelaide, January +2004). The paper is available online at: + +http://oss.software.ibm.com/linux/papers/libsysfs/libsysfs-linuxconfau2004.pdf + 5. Data Structures ------------------ @@ -1824,11 +1831,15 @@ Prototype: struct sysfs_attribute *sysfs_open_driver_attr ------------------------------------------------------------------------------- -7. Navigating a dlist ---------------------- +7 Dlists +-------- Libsysfs uses (yet another) list implementation thanks to Eric J Bohm. + +7.1 Navigating a dlist +---------------------- + Some library functions return a dlist of devices/drivers/attributes, etc. To navigate the list returned the macro "dlist_for_each_data" is to be used. @@ -1868,6 +1879,24 @@ Usage example: The function sysfs_get_classdev_attributes() returns a ------------------------------------------------------------------------------- +7.2 Custom sorting using dlist_sort_custom() +-------------------------------------------- + +As of release 1.2.0, libsysfs provides a new interface for custom sorting +of dlists. The API dlist_sort_custom() has been added for this purpose. +Applications that would like to define their own sorter function can now +make use of this API. + +The sorter function must conform to the following prototype: + + int compare(void *a, void*b) + +dlist_sort_custom() expects that the compare function will: + return >0 for a before b + return <0 for b before a + return 0 for a == b + + 8. Usage -------- |