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



Tak, nu fik jeg kompileret programmet, men jeg får en fejlbesked:

ioctl: Operation not permitted

Jeg har SU'ed til root først!

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


On Fri, Oct 22 1999, Dansbo, Jimmy wrote:
> 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)

Ok, du kører med en 2.0 kerne. I det tilfælde skal du droppe
CDSL_CURRENT argumentet fra begge ioctl kald. CDS_MIXED CD
typen eksisterer ikke i 2.0 heller.

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

Det ser godt nok ud - til 2.2/2.3 kerner skal du ikke inkludere
ucdrom.h, det var derfor jeg heller ikke havde den med.

> 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?

Der blev inkluderet changer support i 2.1 kernen og det
sidste argument specificerer hvilken slot kaldet er til.
CDSL_CURRENT er så CD Slot Current. CDS_MIXED blev introduceret
fordi ham der lavede det interface ikke lavede disc typer
som en bit maske, som CDS_DATA_1 | CDS_AUDIO for eksempel.
Derfor blev det nødvendigt med en ny type.

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