[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] automatisk mount umount af CD-ROM!



On Thu, Oct 21 1999, Dansbo, Jimmy wrote:
> Hvordan får jeg fat i/læser CDROM_DRIVE_STATUS og CDROM_DISC_STATUS?

fd = open("/dev/cdrom", O_NONBLOCK | O_RDONLY);
ret = ioctl(fd, CDROM_DRIVE_STATUS, CDSL_CURRENT);
if (ret == CDS_DISC_OK) {
	ret = ioctl(fd, CDROM_DISC_STATUS, CDSL_CURRENT);
	...

Efter CDROM_DISC_STATUS er ret så enten :

CDS_AUDIO - audio disc
CDS_MIXED - data disc med audio tracks på

og så videre. Og det er så faktisk strukturen i dit automount /
autoplay program. Som reference kan du kigge i 
Documentation/cdrom/cdrom-standard.tex - den er godt nok
ikke helt uptodate (ups), men ovenstående er dækket.

-- 
*  Jens Axboe <sslug@sslug>
*  Linux CD-ROM Maintainer
*  http://www.kernel.dk


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *