summaryrefslogtreecommitdiff
path: root/extras/scsi_id
diff options
context:
space:
mode:
authordsteklof@us.ibm.com <dsteklof@us.ibm.com>2003-12-19 18:29:10 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:13:09 -0700
commitbcbe2d8e7d4ccd975e79d0c7defbe1d64d1b129c (patch)
tree78cc968183dc45e80f96133e4cb1a1c94ca461bd /extras/scsi_id
parent7591c18a8f3460d3e7cab85d02915c4b51638b5c (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 'extras/scsi_id')
-rw-r--r--extras/scsi_id/scsi_id.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c
index 3a34643c81..6bb41132de 100644
--- a/extras/scsi_id/scsi_id.c
+++ b/extras/scsi_id/scsi_id.c
@@ -158,7 +158,7 @@ static int get_major_minor(const char *devpath, int *major, int *minor)
char *dev;
dprintf("%s\n", devpath);
- class_dev = sysfs_open_class_device(devpath);
+ class_dev = sysfs_open_class_device_path(devpath);
if (!class_dev) {
log_message(LOG_WARNING, "open class %s failed: %s\n", devpath,
strerror(errno));
@@ -708,7 +708,7 @@ static int scsi_id(const char *target_path, char *maj_min_dev)
return 1;
}
- scsi_dev = sysfs_open_class_device(full_dev_path);
+ scsi_dev = sysfs_open_class_device_path(full_dev_path);
if (!scsi_dev) {
log_message(LOG_WARNING, "open class %s failed: %s\n",
full_dev_path, strerror(errno));