On Sat, 2006-08-12 at 20:37 +0200, Joerg Schilling wrote:
John Plocher <[EMAIL PROTECTED]> wrote:

But, if cdrecord *is* smart enough to discover all the cd/dvd devices on the system, it should also be gracious enough to figure out what to do if there is only one device found.
The problem with higly portable programs with cdrecord is that it is hard to add features that cannot be implemented on all supported platforms. The Linux
Kernel developers did e.g. prevent this device discovery two years ago.

I don't think cdrw does this device detection in any especially clever way. Certainly not with a "tell me the CD writer device" syscall.

Instead it just does opendir("/dev/dsk") and then tests each device in turn to see if it's a CD/DVD writer.

So the guess would be that you could implement this on any platform where "cdrecord -scanbus" works:

a) Perform the -scanbus scan. But save the results internally rather than printing.

b) If you got exactly one device from scanbus, use that. Maybe also check here that it contains writable media if desired.

Hugh.
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to