From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 17:16:37 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7427A106566C for ; Wed, 28 Jan 2009 17:16:37 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id B03DE8FC19 for ; Wed, 28 Jan 2009 17:16:36 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl21-232.kln.forthnet.gr [77.49.148.232]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id n0SH60YP012617 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 28 Jan 2009 19:06:05 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id n0SH60Kb005693; Wed, 28 Jan 2009 19:06:00 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id n0SH601A005692; Wed, 28 Jan 2009 19:06:00 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: "M. Warner Losh" References: <20090128.020950.-1962670362.imp@bsdimp.com> <87k58f7npu.fsf@kobe.laptop> <20090128.092046.84362525.imp@bsdimp.com> <87mydbiecp.fsf@kobe.laptop> Date: Wed, 28 Jan 2009 19:05:59 +0200 In-Reply-To: <87mydbiecp.fsf@kobe.laptop> (Giorgos Keramidas's message of "Wed, 28 Jan 2009 18:29:10 +0200") Message-ID: <87d4e7e4y0.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: n0SH60YP012617 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.866, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.53, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: hackers@freebsd.org Subject: Re: Code review request: cdcontrol status label additon X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2009 17:16:38 -0000 On Wed, 28 Jan 2009 18:29:10 +0200, Giorgos Keramidas wrote: > On Wed, 28 Jan 2009 09:20:46 -0700 (MST), "M. Warner Losh" wrote: >> Not going to look at glabel for this. I lifted the code from glable, >> but must have done it badly. I'll grab a core 10 cd and see what's up. > > It may not be Fedora specific. I just happened to have it handy... > > Sorry for creating *more* work for you. I'll see if I can hack at > cdcontrol too, and provide more useful input :) If it helps at all, I added this: lseek(fd, ISO9660_OFFSET, SEEK_SET); rc = read (fd, buffer, CD_SECTOR_LEN); + if (rc == -1) + err(1, "read"); if (rc == CD_SECTOR_LEN && memcmp(buffer, ISO9660_MAGIC, sizeof(ISO9660_MAGIC) - 1) == 0) { and it seems that read() fails with EIO: lseek(3,0x8000,SEEK_SET) = 32768 (0x8000) read(3,0xbfbfe3a3,2048) ERR#5 'Input/output error' My `/var/log/messages' shows at the same time: Jan 28 19:01:52 kobe kernel: acd0: FAILURE - non aligned DMA transfer attempted Jan 28 19:01:52 kobe kernel: acd0: setting up DMA failed This is with a FreeBSD 8.0-CURRENT kernel from svn /head @ 187792. So it may not really be a problem with the patch itself...