From owner-freebsd-bugs Wed Jul 10 17:20:26 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A31237B406 for ; Wed, 10 Jul 2002 17:20:04 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF3E943E31 for ; Wed, 10 Jul 2002 17:20:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g6B0K3JU078443 for ; Wed, 10 Jul 2002 17:20:03 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g6B0K3XA078442; Wed, 10 Jul 2002 17:20:03 -0700 (PDT) Date: Wed, 10 Jul 2002 17:20:03 -0700 (PDT) Message-Id: <200207110020.g6B0K3XA078442@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Gregory Bond Subject: Re: misc/40430: Writing to DVD+RW using burncd does not work. Reply-To: Gregory Bond Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR misc/40430; it has been noted by GNATS. From: Gregory Bond To: Peter Haight Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: misc/40430: Writing to DVD+RW using burncd does not work. Date: Thu, 11 Jul 2002 10:18:46 +1000 I am not a kernel hacker, but a few things look a bit odd to me, and I am seeking enlightenment: [acd ioctl handling] > + case DVDIOFORMATPROGRESS: > + error = acd_get_format_progress(cdp, (int *) addr); [dvdio.h] >+#define DVDIOFORMATPROGRESS _IOR('c', 205, struct dvd_format_params) Isn't this inconsistent with the above code? Shouldn't it be "int' instead of 'struct dvd_format_params'? > +static int > +acd_get_format_progress(struct acd_softc *cdp, int *finished) > +{ [snip] > + if (response.sksv) > + *finished = ((response.sk_specific2 | (response.sk_specific1 << 8)) * 1 > 00) / 65535; > + else > + *finished = 0; > + return 0; Doesn't this need to use copyout()? What happens if a user program passes NULL to the ioctl? Greg, whose memory of Leffler, McKusick et al is fading fast! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message