From owner-freebsd-emulation@FreeBSD.ORG Sat Oct 25 10:58:51 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B20F4106567B for ; Sat, 25 Oct 2008 10:58:51 +0000 (UTC) (envelope-from martin.laabs@mailbox.tu-dresden.de) Received: from mailout2.zih.tu-dresden.de (mailout2.zih.tu-dresden.de [141.30.67.73]) by mx1.freebsd.org (Postfix) with ESMTP id 70F318FC08 for ; Sat, 25 Oct 2008 10:58:51 +0000 (UTC) (envelope-from martin.laabs@mailbox.tu-dresden.de) Received: from rmc67-31.zih.tu-dresden.de ([141.30.67.31] helo=server-n) by mailout2.zih.tu-dresden.de with esmtp (Exim 4.63) (envelope-from ) id 1KtgQE-0007xK-Fn for freebsd-emulation@freebsd.org; Sat, 25 Oct 2008 12:31:06 +0200 Received: from localhost (p5B0ECAA7.dip.t-dialin.net [91.14.202.167]) by server-n (Postfix) with ESMTP id 105BA100A091 for ; Sat, 25 Oct 2008 12:31:01 +0200 (CEST) Date: Sat, 25 Oct 2008 12:31:00 +0200 To: freebsd-emulation@freebsd.org From: "Martin Laabs" Content-Type: text/plain; charset=iso-8859-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: User-Agent: Opera Mail/9.51 (Linux) X-TUD-Virus-Scanned: mailout2.zih.tu-dresden.de Subject: How to implement a new linuxulator ioctl X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Oct 2008 10:58:51 -0000 Hi, as I wrote recently on -hackers I hacked libusb in a way that it is a linux binary but uses the bsd interface for low-level usb communication. I need this for a linux binary program which uses libusb. I'd like to run this with the linuxulator. However - I realized, that the ioctls of the linuxulator are wrapped. So I have to add some ioctls to the linuxulator module in that way that they are just executed as normal (nativ) system ioctls. Libusb uses only a small number of different ioctl so that it should not be very hard. However I have not found any documentation how the ioctl mapping works. (data structures, initilisation calls and so on.) So can you give me a short guideline what I have to do/add to the linuxulator? And maybe also how I can call a nativ system ioctl out of the kernel context. Thank you, Martin L.