From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O47u5-00047T-Ub for qemu-devel@nongnu.org; Tue, 20 Apr 2010 03:29:54 -0400 Received: from [140.186.70.92] (port=32987 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O47tS-00043R-DO for qemu-devel@nongnu.org; Tue, 20 Apr 2010 03:29:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O47sl-0002CQ-GL for qemu-devel@nongnu.org; Tue, 20 Apr 2010 03:29:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10140) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O47sl-0002Bh-3f for qemu-devel@nongnu.org; Tue, 20 Apr 2010 03:28:31 -0400 Message-ID: <4BCD5796.1030502@redhat.com> Date: Tue, 20 Apr 2010 09:28:22 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v2] Write cmos hd data for ide drives using -device parm References: <4BC482850200004800092E82@sinclair.provo.novell.com> <4BC56D9A.7010606@redhat.com> <4BCC63030200004800093962@sinclair.provo.novell.com> In-Reply-To: <4BCC63030200004800093962@sinclair.provo.novell.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bruce Rogers Cc: qemu-devel@nongnu.org Hi, > Not much traffic on this thread ;-) Indeed ;) > I can see the usefulness of an init_late() to generalize post device setup issues. > I assume then that you didn't have any other issues with my patch, other than general code structure concerns? Yes, that is the major one. I think it is much saner to just have a init_late() and collect everything there instead of creating a new hook each time you figure you need one. I think this also allows to make the ide changes less intrusive as all the cmos setup logic stays local to pc.c. pc.c can simply keep a pointer to the DeviceState structs of the ide interface(s) created in pc_init1(). pc_init_late() then can check which drives are plugged in and update cmos accordingly. cheers, Gerd