How to identify drive letter from SCSI Id?

vbimport

#1

Hi guys

I’m writing a program to burn CD/DVD using cdrecord.
Now I can detect the SCSI Id of the drive using

cdrecord -scanbus

which gives me something like this

scsibus0:
        0,0,0     0) 'HL-DT-ST' 'DVD+-RW GSA-T21N' 'A102' Removable CD-ROM
        0,1,0     1) *
        0,2,0     2) *
        0,3,0     3) *
        0,4,0     4) *
        0,5,0     5) *
        0,6,0     6) *
        0,7,0     7) HOST ADAPTOR
scsibus1:
        1,0,0   100) 'TOSHIBA ' 'MK8046GSX       ' 'LB31' Disk
        1,1,0   101) *
        1,2,0   102) *
        1,3,0   103) *
        1,4,0   104) *
        1,5,0   105) *
        1,6,0   106) *
        1,7,0   107) HOST ADAPTOR
scsibus2:
        2,0,0   200) 'HL-DT-ST' 'DVDRAM GSA-E40N ' 'RE02' Removable CD-ROM
        2,1,0   201) *
        2,2,0   202) *
        2,3,0   203) *
        2,4,0   204) *
        2,5,0   205) *
        2,6,0   206) *
        2,7,0   207) HOST ADAPTOR

Now I need to verify the data. What I need is to get
the path to the drive like e: in windows.

How can I get this information from SCSI Id ?
Are there any way to map it ?
My program is written in Java and will be running on Linux also.

Thankssss