From owner-freebsd-hackers Wed Apr 28 2: 0:56 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 0E66A15644 for ; Wed, 28 Apr 1999 02:00:52 -0700 (PDT) (envelope-from des@flood.ping.uio.no) Received: (from des@localhost) by flood.ping.uio.no (8.9.2/8.9.1) id LAA20874; Wed, 28 Apr 1999 11:00:42 +0200 (CEST) (envelope-from des) To: shocking@prth.pgs.com (Stephen Hocking-Senior Programmer PGS Tensor Perth) Cc: hackers@FreeBSD.ORG Subject: Re: Porting Linux Device drivers References: <199904260431.MAA04537@ariadne.tensor.pgs.com> From: Dag-Erling Smorgrav Date: 28 Apr 1999 11:00:41 +0200 In-Reply-To: shocking@prth.pgs.com's message of "Mon, 26 Apr 1999 12:31:27 +0800" Message-ID: Lines: 14 X-Mailer: Gnus v5.5/Emacs 19.34 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. DES -- Dag-Erling Smorgrav - des@flood.ping.uio.no To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message