Date: Sun, 04 Apr 2004 13:07:50 -0400 From: Chuck Swiger <cswiger@mac.com> To: Eric De la Cruz Lugo <eric@iteso.mx> Cc: freebsd-standards@FreeBSD.ORG Subject: Re: i386_get_ioperm syntax.... Message-ID: <407040E6.3010504@mac.com> In-Reply-To: <1081013624.406ef5788b3a1@iteso.mx> References: <1080397817.40658ff979c2e@iteso.mx> <20040328231756.GA86437@VARK.homeunix.com> <1081013624.406ef5788b3a1@iteso.mx>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?407040E6.3010504>