From e405092ab00bf8953e6a32f7667bd2917c509b87 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 11 Dec 2006 13:45:50 +0000 Subject: [PATCH] Enabled correct SCSI address parameter registration for /dev/srM --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/sg-linux.c | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 3a3c440..df60154 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2006.12.11.125222" +#define Cdrskin_timestamP "2006.12.11.134452" diff --git a/libburn/sg-linux.c b/libburn/sg-linux.c index 18d9379..7d80ac6 100644 --- a/libburn/sg-linux.c +++ b/libburn/sg-linux.c @@ -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(