Hi!

This is a GRSecurity issue, to protect system integrity, it forbids direct
I/O access.


Luis Correia   
Bering uClibc Team Member

PGP Fingerprint: BC44 D7DA 5A17 F92A CA21 9ABE DFF0 3540 2322 21F6 
Key Server: http://pgp.mit.edu


> -----Original Message-----
> From: Felix Theodor [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 27, 2004 1:08 PM
> To: [EMAIL PROTECTED]
> Subject: [leaf-user] ioperm
> 
> Hello,
> 
> I try to run this example in my leaf box.
> And I get the message: ioperm: opperation not permit
> 
> 
> thank you for any advice
> felix
> 
> 
> /*
>  * example.c: very simple example of port I/O
>  *
>  * This code does nothing useful, just a port write, a
> pause,
>  * and a port read. Compile with `gcc -O2 -o example
> example.c',
>  * and run as root with `./example'.
>  */
> 
> #include <stdio.h>
> #include <unistd.h>
> #include <asm/io.h>
> 
> #define BASEPORT 0x378 /* lp1 */
> 
> int main()
> {
>   /* Get access to the ports */
>   if (ioperm(BASEPORT, 2, 1)) {perror("ioperm");
> exit(1);}
> 
>   /* Set the data signals (D0-7) of the port to all
> low (0) */
>   outb(0, BASEPORT);
> 
>   /* Sleep for a while (100 ms) */
>   usleep(100000);
> 
>   /* Read from the status port (BASE+1) and display
> the result */
>   printf("status: %d\n", inb(BASEPORT + 1));
> 
>   /* We don't need the ports anymore */
>   if (ioperm(BASEPORT, 3, 0)) {perror("ioperm");
> exit(1);}
> 
>   exit(0);
> }
> 
> /* end of example.c */ 
> 
> 
> 
> 
>       
> 
>       
>               
> ___________________________________________________________
> Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos 
> - Hier anmelden: http://mail.yahoo.de
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
> --------------------------------------------------------------
> ----------
> leaf-user mailing list: [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/leaf-user
> SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html
> 


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
------------------------------------------------------------------------
leaf-user mailing list: [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user
SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html

Reply via email to