From owner-freebsd-current@FreeBSD.ORG Sat Dec 6 11:42:04 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 83FF516A4CE for ; Sat, 6 Dec 2003 11:42:04 -0800 (PST) Received: from smtp.mho.com (smtp.mho.net [64.58.4.6]) by mx1.FreeBSD.org (Postfix) with SMTP id 5B7F043FE0 for ; Sat, 6 Dec 2003 11:42:03 -0800 (PST) (envelope-from scottl@freebsd.org) Received: (qmail 34550 invoked by uid 1002); 6 Dec 2003 19:42:00 -0000 Received: from unknown (HELO freebsd.org) (64.58.1.252) by smtp.mho.net with SMTP; 6 Dec 2003 19:42:00 -0000 Message-ID: <3FD230C3.1090205@freebsd.org> Date: Sat, 06 Dec 2003 12:40:51 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031103 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mathew Kanner References: <20031206174859.GA22714@igloo.linux.gr> <20031206175502.GB95786@cnd.mcgill.ca> In-Reply-To: <20031206175502.GB95786@cnd.mcgill.ca> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: Lefteris Chatzibarbas cc: freebsd-current@freebsd.org Subject: Re: burncd(8) CD-RW blanking problem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2003 19:42:04 -0000 Mathew Kanner wrote: > On Dec 06, Lefteris Chatzibarbas wrote: > > >>[...] > > >>After a little searching it seems that the program cannot get out of the >>while() loop at line 198 of src/usr.sbin/burncd/burncd.c: >> >> while (1) { >> sleep(1); >> if (ioctl(fd, CDRIOCGETPROGRESS, &pct) == -1) >> err(EX_IOERR,"ioctl(CDRIOGETPROGRESS)"); >> if (pct > 0 && !quiet) >> fprintf(stderr, >> "%sing CD - %d %% done \r", >> blank == CDR_B_ALL ? >> "eras" : "blank", pct); >> if (pct == 100 || (pct == 0 && last > 90)) >> break; >> last = pct; >> } >> >>The pct variable is always 0, even after the blanking of the CD-RW is >>finished (according to the device's LEDs), so the program falls into an >>infinite loop. >> >>Of course, hitting ^C exits burncd... >> >>Does anyone else has this problem? Is it specific to my CD-R/RW device? > > > I have the exact same problem. It stays stuck in the loop > because ioctl(fd, CDRIOGETPROGRESS, &pct) pct is always 0. > > --Mat > I'm seeing this too. What's odd is that my cd drive is reporting back incorrect sense information; the valid bit is not set, the asc/ascq is suspect (4/8), and the sense key specific data is all 0. Since other fields in the sense data are reasonable, it's not as if no sense data is being returned at all. So it looks like the CDRIOGETPROGRESS ioctl handler is doing the right thing, but the cd drive is not. Maybe the driver is doing something wrong when it issues the erase command, but I can't convince myself that that is likely. Scott