/* Given a struct scsi_lun of: 0a 04 0b 03 00 00 00 00, this function returns the integer: 0x0b030a04  */
int scsilun_to_int(struct scsi_lun *scsilun)
/* Given a struct scsi_lun of: 0a 04 0b 03 00 00 00 00, this function returns the integer: 0x0b030a04  */
int scsilun_to_int(struct scsi_lun *scsilun)
{
	int i;
	unsigned int lun;
	lun = 0;
	for (i = 0; i < sizeof(lun); i += 2)
		lun = lun | (((scsilun->scsi_lun[i] << 8) |
			      scsilun->scsi_lun[i + 1]) << (i * 8));
	return lun;
}