diff options
author | dsteklof@us.ibm.com <dsteklof@us.ibm.com> | 2003-12-19 18:29:10 -0800 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:13:09 -0700 |
commit | bcbe2d8e7d4ccd975e79d0c7defbe1d64d1b129c (patch) | |
tree | 78cc968183dc45e80f96133e4cb1a1c94ca461bd /libsysfs/libsysfs.h | |
parent | 7591c18a8f3460d3e7cab85d02915c4b51638b5c (diff) |
[PATCH] libsysfs 0.4.0 patch
Ananth released sysfsutils 0.4.0 last night, I'm sure you saw the email.
Here's a patch with the latest changes from the pre-patch I already
gave you. It includes sysfs_get_device_parent(), which you said you
needed. I've run your test scripts and I've built scsi_id. Please
play around with this and check it out.
There are quite a few changes. Please do not access
structure pointers, like sysfs_device's parent, directly like
dev->parent. Please use the "get" function to retrieve. The functions
load things on demand and refresh views under the covers.
Diffstat (limited to 'libsysfs/libsysfs.h')
-rw-r--r-- | libsysfs/libsysfs.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/libsysfs/libsysfs.h b/libsysfs/libsysfs.h index aca25772b5..2ffe1005cc 100644 --- a/libsysfs/libsysfs.h +++ b/libsysfs/libsysfs.h @@ -182,7 +182,9 @@ extern struct sysfs_attribute *sysfs_get_directory_attribute /* sysfs driver access */ extern void sysfs_close_driver(struct sysfs_driver *driver); -extern struct sysfs_driver *sysfs_open_driver(const unsigned char *path); +extern struct sysfs_driver *sysfs_open_driver + (const unsigned char *drv_name, const unsigned char *bus_name); +extern struct sysfs_driver *sysfs_open_driver_path(const unsigned char *path); extern struct sysfs_attribute *sysfs_get_driver_attr (struct sysfs_driver *drv, const unsigned char *name); extern struct dlist *sysfs_get_driver_attributes(struct sysfs_driver *driver); @@ -199,12 +201,13 @@ extern struct sysfs_root_device *sysfs_open_root_device (const unsigned char *name); extern struct dlist *sysfs_get_root_devices(struct sysfs_root_device *root); extern void sysfs_close_device(struct sysfs_device *dev); -extern struct sysfs_device *sysfs_open_device(const unsigned char *path); +extern struct sysfs_device *sysfs_open_device + (const unsigned char *bus_id, const unsigned char *bus); +extern struct sysfs_device *sysfs_get_device_parent(struct sysfs_device *dev); +extern struct sysfs_device *sysfs_open_device_path(const unsigned char *path); extern struct sysfs_attribute *sysfs_get_device_attr (struct sysfs_device *dev, const unsigned char *name); extern struct dlist *sysfs_get_device_attributes(struct sysfs_device *device); -extern struct sysfs_device *sysfs_open_device_by_id - (const unsigned char *bus_id, const unsigned char *bus); extern struct sysfs_attribute *sysfs_open_device_attr(const unsigned char *bus, const unsigned char *bus_id, const unsigned char *attrib); @@ -227,8 +230,10 @@ extern int sysfs_find_driver_bus(const unsigned char *driver, /* generic sysfs class access */ extern void sysfs_close_class_device(struct sysfs_class_device *dev); -extern struct sysfs_class_device *sysfs_open_class_device +extern struct sysfs_class_device *sysfs_open_class_device_path (const unsigned char *path); +extern struct sysfs_class_device *sysfs_open_class_device + (const unsigned char *class, const unsigned char *name); extern struct sysfs_device *sysfs_get_classdev_device (struct sysfs_class_device *clsdev); extern struct sysfs_driver *sysfs_get_classdev_driver @@ -240,8 +245,6 @@ extern struct sysfs_class *sysfs_open_class(const unsigned char *name); extern struct dlist *sysfs_get_class_devices(struct sysfs_class *cls); extern struct sysfs_class_device *sysfs_get_class_device (struct sysfs_class *class, unsigned char *name); -extern struct sysfs_class_device *sysfs_open_class_device_by_name - (const unsigned char *class, const unsigned char *name); extern struct dlist *sysfs_get_classdev_attributes (struct sysfs_class_device *cdev); extern struct sysfs_attribute *sysfs_get_classdev_attr |