summaryrefslogtreecommitdiff
path: root/extras/scsi_id/scsi_id.h
diff options
context:
space:
mode:
Diffstat (limited to 'extras/scsi_id/scsi_id.h')
-rw-r--r--extras/scsi_id/scsi_id.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/extras/scsi_id/scsi_id.h b/extras/scsi_id/scsi_id.h
index eb9498ab71..cb27e88a5f 100644
--- a/extras/scsi_id/scsi_id.h
+++ b/extras/scsi_id/scsi_id.h
@@ -42,8 +42,14 @@
static inline char *sysfs_get_attr(struct sysfs_class_device *dev,
const char *attr)
{
- return sysfs_get_value_from_attributes(dev->directory->attributes,
- attr);
+ struct dlist *attributes = NULL;
+
+ attributes = sysfs_get_classdev_attributes(dev);
+
+ if (attributes == NULL)
+ return NULL;
+
+ return sysfs_get_value_from_attributes(attributes, attr);
}
extern int scsi_get_serial (struct sysfs_class_device *scsi_dev,