i386_get_ioperm syntax....
Chuck Swiger
cswiger at mac.com
Sun Apr 4 10:08:04 PDT 2004
Eric De la Cruz Lugo wrote:
[ ... ]
> callbacks.cc: In member function `int CPost::DeviceControl(int, int)':
> callbacks.cc:160: error: invalid conversion from `int' to `unsigned int*'
> callbacks.cc:160: error: invalid conversion from `int' to `int*'
> callbacks.cc:163: error: invalid conversion from `int' to `unsigned int*'
> *** Error code 1
[ ... ]
> else if(flags==5){
> return i386_get_ioperm(0x3F8, 6, 1);
> }
> else if(flags==6){
> return i386_get_ioperm(0x3F8, 6, 0);
> }
[ ... ]
> some knows how to solve something like this?, am not a c++ programmer, if
> someone can give me a hint about what the right values for the
> i386_get_ioperm() should be in FreeBSD 5.2.1, please reply to my e-mail.
You need to pass the address of a variable (ie, &myvar) to i386_get_ioperm(),
which will set your variables to the appropriate values when you call it.
See the manpage:
int
i386_get_ioperm(unsigned int start, unsigned int *length, int *enable);
[ ... ]
DESCRIPTION
i386_get_ioperm() will return the permission for the process' I/O port
space in the *enable argument. The port range starts at start and the
number of contiguous entries will be returned in *length.
--
-Chuck
More information about the freebsd-standards
mailing list