From owner-freebsd-hackers Wed Apr 28 18:31:11 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 CF83414D08 for ; Wed, 28 Apr 1999 18:31:00 -0700 (PDT) (envelope-from shocking@ariadne.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 JAA06636; Thu, 29 Apr 1999 09:30:19 +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 JAA26340; Thu, 29 Apr 1999 09:30:49 +0800 (WST) Received: from ariadne by ariadne.tensor.pgs.com (SMI-8.6/SMI-SVR4) id JAA12353; Thu, 29 Apr 1999 09:30:49 +0800 Message-Id: <199904290130.JAA12353@ariadne.tensor.pgs.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Dag-Erling Smorgrav Cc: hackers@freebsd.org Subject: Re: Porting Linux Device drivers In-reply-to: Your message of "28 Apr 1999 11:00:41 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 29 Apr 1999 09:30:48 +0800 From: Stephen Hocking-Senior Programmer PGS Tensor Perth Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > shocking@prth.pgs.com (Stephen Hocking-Senior Programmer PGS Tensor Perth) writes: > > 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. > > The userland part of the syscall mechanism stores the returned value > in errno and returns ((ret == 0) ? p_retval[0] : -1). Hence, if you > want to return a specific value, store it in p_retval[0] and return 0 > to indicate success. Aaagh, I just found out where I goofed when trying to do this. That bit now works. What happens now is that a passed structure from the glide lib's ioctl calls doesn't seem to agree with the definition I have in the driver. Sigh. Stephen -- The views expressed above are not those of PGS Tensor. "We've heard that a million monkeys at a million keyboards could produce the Complete Works of Shakespeare; now, thanks to the Internet, we know this is not true." Robert Wilensky, University of California To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message