From owner-freebsd-hackers Wed Aug 9 7:24:34 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (flutter.freebsd.dk [212.242.40.147]) by hub.freebsd.org (Postfix) with ESMTP id 52CAB37BB21 for ; Wed, 9 Aug 2000 07:24:28 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.3/8.9.3) with ESMTP id QAA09041; Wed, 9 Aug 2000 16:24:23 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: "Theo van Klaveren" Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: In-kernel ioctl calls In-Reply-To: Your message of "Wed, 09 Aug 2000 16:19:25 +0200." <001e01c0020c$d257b3c0$19e55982@student.utwente.nl> Date: Wed, 09 Aug 2000 16:24:23 +0200 Message-ID: <9039.965831063@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <001e01c0020c$d257b3c0$19e55982@student.utwente.nl>, "Theo van Klaveren" writes: >I think I've finally figured out why AudioFS isn't working (aside from an >endianess error in v0.1), but I can't think of a solution. The problem I've >found is as follows: The code in atapi-cd.c (from Soren's ATA driver) >assumes the passed buffer (in the ioctl struct) is in user-space. The >following is the offending piece of code from the CDIOCREADAUDIO ioctl call: > >--- snip --- > if ((error = atapi_queue_cmd(cdp->atp, ccb, buffer, size, > ATPR_F_READ, 30, NULL,NULL))) > break; > > if ((error = copyout(buffer, ubuf, size))) > break; >--- snip --- You want to look at "struct uio", but it may be an ugly thing to get it used where you need it. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD coreteam member | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message