From 1619135256e29888a33eacc3a30bde46ee3ea8c7 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 --- libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- libburn/trunk/libburn/sg-linux.c | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index 3a3c440e..df601549 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2006.12.11.125222" +#define Cdrskin_timestamP "2006.12.11.134452" diff --git a/libburn/trunk/libburn/sg-linux.c b/libburn/trunk/libburn/sg-linux.c index 18d93795..7d80ac6a 100644 --- a/libburn/trunk/libburn/sg-linux.c +++ b/libburn/trunk/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(