From owner-freebsd-standards@FreeBSD.ORG Sun Apr 4 10:08:04 2004 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D09116A4CF for ; Sun, 4 Apr 2004 10:08:04 -0700 (PDT) Received: from out009.verizon.net (out009pub.verizon.net [206.46.170.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id B37A543D48 for ; Sun, 4 Apr 2004 10:08:03 -0700 (PDT) (envelope-from cswiger@mac.com) Received: from mac.com ([68.160.247.127]) by out009.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20040404170803.DGVC29216.out009.verizon.net@mac.com>; Sun, 4 Apr 2004 12:08:03 -0500 Message-ID: <407040E6.3010504@mac.com> Date: Sun, 04 Apr 2004 13:07:50 -0400 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040316 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric De la Cruz Lugo References: <1080397817.40658ff979c2e@iteso.mx> <20040328231756.GA86437@VARK.homeunix.com> <1081013624.406ef5788b3a1@iteso.mx> In-Reply-To: <1081013624.406ef5788b3a1@iteso.mx> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out009.verizon.net from [68.160.247.127] at Sun, 4 Apr 2004 12:08:02 -0500 cc: freebsd-standards@FreeBSD.ORG Subject: Re: i386_get_ioperm syntax.... X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2004 17:08:04 -0000 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