Subject: Re: Outb() call
To: Jean-Edouard BABIN <listes@jeb.com.fr>
From: Sami Kantoluoto <sami.kantoluoto@embedtronics.fi>
List: port-i386
Date: 03/07/2004 00:19:55
Hi,

On Sat, Mar 06, 2004 at 11:11:44PM +0100, Jean-Edouard BABIN wrote:

> I am trying to access // port using outb()
> Using this simple code:
> 
> #include <sys/types.h>
> #include <fcntl.h>
> #include "/usr/include/x86/pio.h"
> 
> int main() {
>         int fHndl;
>         fHndl = open("/dev/io", O_RDONLY);
>         outb(0x378,255);
>         close(fHndl);
> }

Are you sure you have the permiossion to open the device? Check the return
value (of open()) before doing anything else ;-).


      -sk