Enabled correct SCSI address parameter registration for /dev/srM

This commit is contained in:
Thomas Schmitt 2006-12-11 13:45:50 +00:00
parent c6d22a1eb0
commit e405092ab0
2 changed files with 14 additions and 2 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2006.12.11.125222"
#define Cdrskin_timestamP "2006.12.11.134452"

View File

@ -439,7 +439,7 @@ static void sg_enumerate(void)
{
struct sg_scsi_id sid;
int i, fd, sibling_fds[LIBBURN_SG_MAX_SIBLINGS], sibling_count= 0, ret;
int bus_no = -1;
int bus_no= -1, host_no= -1, channel_no= -1, target_no= -1, lun_no= -1;
char fname[10];
if (linux_sg_enumerate_debug)
@ -495,6 +495,18 @@ static void sg_enumerate(void)
continue;
}
if (sid.scsi_type != TYPE_ROM) {
/* ts A61211 : employ a more general ioctl */
ret = sg_obtain_scsi_adr(fname, &bus_no, &host_no,
&channel_no, &target_no, &lun_no);
if (ret>0) {
sid.host_no = host_no;
sid.channel = channel_no;
sid.scsi_id = target_no;
sid.lun = lun_no;
}
}
/* ts A60927 : trying to do locking with growisofs */
if(burn_sg_open_o_excl>1) {
ret = sg_open_scsi_siblings(