From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JAyI1-0006Lj-B0 for qemu-devel@nongnu.org; Fri, 04 Jan 2008 20:57:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JAyHz-0006Jz-Kl for qemu-devel@nongnu.org; Fri, 04 Jan 2008 20:57:32 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JAyHz-0006Jp-B4 for qemu-devel@nongnu.org; Fri, 04 Jan 2008 20:57:31 -0500 Received: from tapir.sajinet.com.pe ([66.139.79.212]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JAyHy-0000Xt-Ti for qemu-devel@nongnu.org; Fri, 04 Jan 2008 20:57:31 -0500 Date: Fri, 4 Jan 2008 20:06:47 -0600 From: Carlo Marcelo Arenas Belon Subject: Re: [Qemu-devel] [RESEND] [PATCH] ide: fix GET_CONFIGURATION DVD-ROM support Message-ID: <20080105020647.GB20718@tapir> References: <20071226073615.GB25052@tapir> <20080104100207.GC9968@tapir> <200801041825.26304.rob@landley.net> <20080105010230.GA2230@miranda.arrow> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080105010230.GA2230@miranda.arrow> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Sat, Jan 05, 2008 at 01:02:30AM +0000, Stuart Brady wrote: > On Fri, Jan 04, 2008 at 06:25:25PM -0600, Rob Landley wrote: > > On Friday 04 January 2008 04:02:07 Carlo Marcelo Arenas Belon wrote: > > > > > > - buf[7] = total_sectors <= 1433600 ? 0x08 : 0x10; /* current > > > > profile */ > > > > Where does the constant come from, anyway? > > 1433600? Seems it's the number of 512 KiB blocks in a 700 MiB CD image > (700 * 1024 * 2). yes, that magic constant corresponds to the maximum expected size for a CD-ROM and is used to detect if the profile used should be for DVD-ROM or not. It came from the original implementation patch for "GET CONFIGURATION" committed in revision 1.66 of ide.c by Filip Navarra as "Partial IDE DVD emulation" http://cvs.savannah.nongnu.org/viewvc/qemu/hw/ide.c?root=qemu&r1=1.65&r2=1.66 Carlo