- export scsilun_to_int
PATCH 1/1 - export scsilun_to_int
export symbol to be used in 1st fusion patch
Signed-off-by Eric Moore <[email protected]>
drivers/scsi/scsi_scan.c +2 -1
@@ -1192,7 +1192,7 @@ static void scsi_sequential_lun_scan(str* Given a struct scsi_lun of: 0a 04 0b 03 00 00 00 00, this function returns * the integer: 0x0b030a04 **/ -static int scsilun_to_int (struct scsi_lun *scsilun) +int scsilun_to_int (struct scsi_lun *scsilun) {int i;unsigned int lun;
@@ -1203,6 +1203,7 @@ static int scsilun_to_int(struct scsi_lu scsilun->scsi_lun[i + 1]) << (i * 8));return lun; } +EXPORT_SYMBOL (scsilun_to_int);/** * int_to_scsilun: reverts an int into a scsi_lun
include/scsi/scsi_device.h +1 -0
@@ -281,6 +281,7 @@ extern void scsi_target_block(struct devextern void scsi_target_unblock (struct device *);extern void scsi_remove_target (struct device *);extern void int_to_scsilun (unsigned int ,struct scsi_lun *); +extern int scsilun_to_int (struct scsi_lun *scsilun);extern const char *scsi_device_state_name (enum scsi_device_state );extern int scsi_is_sdev_device (const struct device *);extern int scsi_is_target_device (const struct device *);
Quoted 3 lines · Eric Moore
export symbol to be used in 1st fusion patch
Signed-off-by Eric Moore <[email protected]>
This is wrong. the "int" represents our internal coding of the 8 byte extended LUN (currently it's a lossy transform that only allows up to two level LUNs, so one day this will definitely change). No driver should be using this internally. From the patches it merely looks like you want to print out the value of a struct scsilun in debugging code, so perhaps a simple print_scsilun or something would be better?
James