From owner-freebsd-hackers Wed Jul 26 12:58:10 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from unix.worldpath.net (unix.worldpath.net [206.152.180.10]) by hub.freebsd.org (Postfix) with ESMTP id 6734C37B7E5 for ; Wed, 26 Jul 2000 12:58:02 -0700 (PDT) (envelope-from waldroni@lr.net) Received: from camry ([208.133.220.178]) by unix.worldpath.net (8.9.3/8.9.3(WPI)) with SMTP id PAA22670 for ; Wed, 26 Jul 2000 15:57:59 -0400 (EDT) Message-ID: <005301bff73b$bf8a3460$0100000a@waldron.house> Reply-To: "Isaac Waldron" From: "Isaac Waldron" To: Subject: Writing device drivers (ioctl issue) Date: Wed, 26 Jul 2000 15:57:36 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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