From owner-freebsd-hackers Sun Apr 25 21:31:35 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from bilby.prth.tensor.pgs.com (unknown [157.147.232.237]) by hub.freebsd.org (Postfix) with ESMTP id B552B14C29 for ; Sun, 25 Apr 1999 21:31:31 -0700 (PDT) (envelope-from shocking@bandicoot.prth.tensor.pgs.com) Received: from bandicoot.prth.tensor.pgs.com (bandicoot.prth.tensor.pgs.com [157.147.224.1]) by bilby.prth.tensor.pgs.com (8.9.3/8.8.8) with ESMTP id MAA01524 for ; Mon, 26 Apr 1999 12:30:59 +0800 (WST) Received: from ariadne.tensor.pgs.com (ariadne [157.147.227.36]) by bandicoot.prth.tensor.pgs.com (8.9.3/8.8.8) with SMTP id MAA09598 for ; Mon, 26 Apr 1999 12:31:27 +0800 (WST) Received: by ariadne.tensor.pgs.com (SMI-8.6/SMI-SVR4) id MAA04537; Mon, 26 Apr 1999 12:31:27 +0800 Date: Mon, 26 Apr 1999 12:31:27 +0800 From: shocking@prth.pgs.com (Stephen Hocking-Senior Programmer PGS Tensor Perth) Message-Id: <199904260431.MAA04537@ariadne.tensor.pgs.com> To: hackers@freebsd.org Subject: Porting Linux Device drivers Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I've nearly finished porting the 3dfx device driver, prior to trying to persuade someone to let me port glide, but have come across an interesting problem. Linux device drivers will return a non-negative number on an ioctl to indicate success and possibly some useful information (such as the number of 3dfx cards, for example). They return errors as negative errnos. The problem I'm having is that I'm using the glide Linux binaries to test the device, and the positive return values are being trapped somewhere and turned into -1, an obvious failure which the Linux glide library interprets as an error, spitting the dummy. I don't have the source to the Linux glide library, so can't correct this error there (where it should be done!). Does anyone have any clues as how to work around this horror? Stephen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message