Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jul 2000 15:57:36 -0400
From:      "Isaac Waldron" <waldroni@lr.net>
To:        <freebsd-hackers@freebsd.org>
Subject:   Writing device drivers (ioctl issue)
Message-ID:  <005301bff73b$bf8a3460$0100000a@waldron.house>

next in thread | raw e-mail | index | archive | help
I started working on a port of FreeMWare/plex86 (www.plex86.org) to FreeBSD
yesterday, and have run into a small problem.  The basic idea is that I need
to write a kernel module that implements some ioctls for a new psuedo-device
that will eventually reside at /dev/plex86.

The issue I'm running into is with the function I'm writing to handle the
ioctls for the device.  For one of the ioctls, the code needs to get some
data from the file descriptor that was passed to the original call to
ioctl(2).  This is easily accomplished in linux, because the file descriptor
is passed as the second argument to the device_ioctl function.

Is there an easy way to get at the same data (the file descriptor passed to
ioctl(2) by the calling program, in a kernel-style "struct file *", not the
standard "struct FILE *") in FreeBSD?  Or will it be neccesary to change the
ioctl structure slightly and therefore need to change some of the higher
level functions in plex?

Thanks in advance,
Isaac Waldron
waldroni at lr dot net



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?005301bff73b$bf8a3460$0100000a>