Hi, attached is my proposal how to make the Solaris driver capable of detecting drives without vold, and how to implement access mode MMC_RDWR.
There are still some problems to solve: ------------------------------------------------ Executing SCSI commands needs superuser authority. I do not know yet, whether there is a finer granulated way to aquire the right to perform the uscsi ioctl. ------------------------------------------------ When inserting a CD with 5000 files in four sessions, the operating system rattles the drive for about 30 seconds. During that time it is nearly impossible to do own read operations. The drive even reports read errors in SCSI sense reply. I suspect my old enemy hald behind that. >:[ ------------------------------------------------ MMC_RDWR_EXCL does not yet trigger a locking attempt. I need to learn more about Solaris. ------------------------------------------------ There are two alternative ways to identify CD drives among the /dev/rdsk devices: - perform SCSI command INQUIRY and look for CD-ROM code 5 in byte 0 of reply. This relies on SCSI specs SPC-3. - perform ioctl(DKIOCINFO) and check .dki_ctype whether it is DKC_CDROM. This relies on Solaris man dkio. libcdio already used ioctl(DKIOCGMEDIAINFO) and included <dkio.h> See #ifdef LIBCDIO_SOLARIS_WITH_CD_INQUIRY Currently it is not defined. I.e. DKIO gets used. ------------------------------------------------ Have a nice day :) Thomas -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
