From d0f7e5b4a0a1b83e515c9fd894d74ed36d7da5c1 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 23 Oct 2012 10:57:59 +0200 Subject: include/sysfs: add SCSI host:channel:target:lun support Signed-off-by: Karel Zak --- include/sysfs.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/sysfs.h') diff --git a/include/sysfs.h b/include/sysfs.h index 9e47a5571..10875d421 100644 --- a/include/sysfs.h +++ b/include/sysfs.h @@ -21,6 +21,13 @@ struct sysfs_cxt { int dir_fd; /* /sys/block/ */ char *dir_path; struct sysfs_cxt *parent; + + unsigned int scsi_host, + scsi_channel, + scsi_target, + scsi_lun; + + unsigned int has_hctl : 1; }; #define UL_SYSFSCXT_EMPTY { 0, -1, NULL, NULL } @@ -65,4 +72,8 @@ extern int sysfs_is_partition_dirent(DIR *dir, struct dirent *d, extern int sysfs_devno_to_wholedisk(dev_t dev, char *diskname, size_t len, dev_t *diskdevno); + +extern int sysfs_scsi_get_hctl(struct sysfs_cxt *cxt, int *h, + int *c, int *t, int *l); + #endif /* UTIL_LINUX_SYSFS_H */ -- cgit v1.2.3-55-g7522