From bcbe2d8e7d4ccd975e79d0c7defbe1d64d1b129c Mon Sep 17 00:00:00 2001 From: "dsteklof@us.ibm.com" Date: Fri, 19 Dec 2003 18:29:10 -0800 Subject: [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. --- extras/scsi_id/scsi_id.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extras') 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)); -- cgit v1.2.3-54-g00ecf