Bug fix: Device file comparison parameters were recorded wrong with Linux sg
This commit is contained in:
parent
2fe4b3ca2a
commit
3fdf11817d
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2018.08.26.141619"
|
#define Cdrskin_timestamP "2018.09.02.200129"
|
||||||
|
@ -1041,22 +1041,18 @@ static int is_scsi_drive(char *fname, int fd_in, int *bus_no, int *host_no,
|
|||||||
{ret = 0; goto ex;}
|
{ret = 0; goto ex;}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sid_ret == -1 || sid.scsi_id < 0) {
|
/* ts A61211 : employ a more general ioctl */
|
||||||
/* ts A61211 : employ a more general ioctl */
|
/* ts B11001 : re-use fd */
|
||||||
/* ts B11001 : re-use fd */
|
/* ts B80902 : call unconditionally because host_no differs
|
||||||
ret = sg_obtain_scsi_adr_fd(fname, fd, bus_no, host_no,
|
between SG_GET_SCSI_ID and SCSI_IOCTL_GET_IDLUN
|
||||||
channel_no, target_no, lun_no);
|
*/
|
||||||
if (ret>0) {
|
ret = sg_obtain_scsi_adr_fd(fname, fd, bus_no, host_no,
|
||||||
sid.host_no = *host_no;
|
channel_no, target_no, lun_no);
|
||||||
sid.channel = *channel_no;
|
if (ret <= 0) {
|
||||||
sid.scsi_id = *target_no;
|
if (linux_sg_enumerate_debug)
|
||||||
sid.lun = *lun_no;
|
fprintf(stderr,
|
||||||
} else {
|
"sg_obtain_scsi_adr_fd() failed\n");
|
||||||
if (linux_sg_enumerate_debug)
|
{ret = 0; goto ex;}
|
||||||
fprintf(stderr,
|
|
||||||
"sg_obtain_scsi_adr_fd() failed\n");
|
|
||||||
{ret = 0; goto ex;}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ts A60927 : trying to do locking with growisofs */
|
/* ts A60927 : trying to do locking with growisofs */
|
||||||
@ -1076,16 +1072,6 @@ static int is_scsi_drive(char *fname, int fd_in, int *bus_no, int *host_no,
|
|||||||
sg_release_siblings(sibling_fds, sibling_fnames,
|
sg_release_siblings(sibling_fds, sibling_fnames,
|
||||||
&sibling_count);
|
&sibling_count);
|
||||||
}
|
}
|
||||||
#ifdef SCSI_IOCTL_GET_BUS_NUMBER
|
|
||||||
if(*bus_no == -1)
|
|
||||||
*bus_no = 1000 * (sid.host_no + 1) + sid.channel;
|
|
||||||
#else
|
|
||||||
*bus_no = sid.host_no;
|
|
||||||
#endif
|
|
||||||
*host_no= sid.host_no;
|
|
||||||
*channel_no= sid.channel;
|
|
||||||
*target_no= sid.scsi_id;
|
|
||||||
*lun_no= sid.lun;
|
|
||||||
ret = 1;
|
ret = 1;
|
||||||
ex:;
|
ex:;
|
||||||
if (fd_in < 0 && fd >= 0) {
|
if (fd_in < 0 && fd >= 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user