From owner-freebsd-questions Mon Mar 18 0:42:25 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mailout01.sul.t-online.com (mailout01.sul.t-online.com [194.25.134.80]) by hub.freebsd.org (Postfix) with ESMTP id A7F0637B400 for ; Mon, 18 Mar 2002 00:42:17 -0800 (PST) Received: from fwd06.sul.t-online.de by mailout01.sul.t-online.com with smtp id 16msiZ-0001Yc-03; Mon, 18 Mar 2002 09:42:11 +0100 Received: from peedub.jennejohn.org (520017439985-0001@[217.235.108.191]) by fmrl06.sul.t-online.com with esmtp id 16msiL-0KXiXQC; Mon, 18 Mar 2002 09:41:57 +0100 Received: from peedub.jennejohn.org (localhost [127.0.0.1]) by peedub.jennejohn.org (8.12.2/8.11.6) with ESMTP id g2I8goGS058604; Mon, 18 Mar 2002 09:42:50 +0100 (CET) (envelope-from garyj@peedub.jennejohn.org) Message-Id: <200203180842.g2I8goGS058604@peedub.jennejohn.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.3 To: jshenry@comp.uark.edu Cc: freebsd-questions@freebsd.org Subject: Re: Need help porting linux code to FreeBSD Reply-To: Gary Jennejohn In-reply-to: Your message of "Sun, 17 Mar 2002 20:11:26 CST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 18 Mar 2002 09:42:50 +0100 From: Gary Jennejohn X-Sender: 520017439985-0001@t-dialin.net Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "Seth Henry" writes: [snip - Linux code] > So, where would I need to start looking to translate this code from Linux to > FreeBSD? In particular, where can I dig up information on the equivalent to > io.h (or is there an io.h in FreeBSD?) I haven't installed all of the source > trees, but I did install the headers. However, I haven't found this file. > > Any help would be appreciated, though I would like to learn how to do this. > The original source code is included below. > Take a look at /usr/src//usr.bin/doscmd, it does accesses to ports from user-land. Basically, it uses i386_set_ioperm(2) to make a port accessible and then some macros (defined in port.c) called in() and out() to do the actual reads/writes. --- Gary Jennejohn / garyj@jennejohn.org gj@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message