Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Mar 2002 09:42:50 +0100
From:      Gary Jennejohn <garyj@jennejohn.org>
To:        jshenry@comp.uark.edu
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Need help porting linux code to FreeBSD 
Message-ID:  <200203180842.g2I8goGS058604@peedub.jennejohn.org>
In-Reply-To: Your message of "Sun, 17 Mar 2002 20:11:26 CST." <F164S2kUfbGRJvoYAMx00010cb1@hotmail.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
"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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203180842.g2I8goGS058604>