[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!



Jeg har lige prøvet at ændre den linie du skrev, men jeg kan stadig ikke få
det til at virke!

Jeg får følgende:

sslug@sslug tmp]# cc test.c -o test
test.c: In function 'main':
test.c:12: 'CDSL_CURRENT' undeclared (first use this function)
test.c:12: (Each undeclared identifier is reported only once
test.c:12: for each function it appears in.)
test.c:50: 'CDS_MIXED' undeclared (first use this function)

Jeg er ikke helt klar over hvad jeg skal inkludere for at få det til at
virke.

Jeg har inkluderet følgende :

#include <stdio.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/cdrom.h>
#include <linux/ucdrom.h>

...


Linie 12 : ret = ioctl(fd, CDROM_DRIVE_STATUS, CDSL_CURRENT);

...

Linie 50 : case CDS_MIXED : printf("blandet data og audio disc\n"); break;


Hvad er det jeg gør galt?

-----Original Message-----
From: Jens Axboe [mailto:sslug@sslug
Sent: 22. oktober 1999 11:45
To: sslug@sslug
Subject: Re: [CPROG] automatisk mount umount af CD-ROM!


On Fri, Oct 22 1999, Dansbo, Jimmy wrote:
> Mange tak, jeg tror jeg har nok til at kunne lave noget selv nu, dit
> eksempel virker ikke helt, men jeg tror at jeg kan finde ud af reste selv.
> 
> Mange tak for din tolmodighed!


>         if (ret == CDS_DISC_OK) {
>                 ret = ioctl(fd, CDROM_DRIVE_STATUS, CDSL_CURRENT);

Her skulle det selvfølgelig være CDROM_DISC_STATUS - jeg har
lige testet her og det virker fint hvis du ændrer den enkelte
linie.

Du skal nok bare være klar over een ting - i standard ATAPI
og SCSI kan man ikke umiddelbart detektere om skuffen er
åben eller om der ingen skive er i. Derfor får du
CDS_NO_DISC i begge tilfælde.

-- 
*  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] *