From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH 17 of 24] libxl: add libxl__spawn_confirm_offspring_startup Date: Wed, 26 Oct 2011 18:30:26 +0200 Message-ID: <20111026163026.GA20100@aepfle.de> References: <018f63b6e4863faca16a.1317657294@probook.site> <20134.54883.620815.989672@mariner.uk.xensource.com> <20111025172159.GA11571@aepfle.de> <20134.63407.291964.492321@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <20134.63407.291964.492321@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Tue, Oct 25, Ian Jackson wrote: > Olaf Hering writes ("Re: [Xen-devel] [PATCH 17 of 24] libxl: add libxl__spawn_confirm_offspring_startup"): > > On Tue, Oct 25, Ian Jackson wrote: > > > Olaf Hering writes ("[Xen-devel] [PATCH 17 of 24] libxl: add libxl__spawn_confirm_offspring_startup"): > > > > libxl: add libxl__spawn_confirm_offspring_startup > > > > > > > > libxl__spawn_confirm_offspring_startup() is a generic version of > > > > libxl__confirm_device_model_startup(). > > > > > > Thanks but I think it would be better to refactor this to avoid the > > > duplication of this code. > > > > The new function is used in patch #18 of this series. > > Or do you have some other changes in mind? > > I mean that you should arrange to replace > libxl__confirm_device_model_startup with your new function > libxl__spawn_confirm_offspring_startup. > > As it is you have made a copy of libxl__confirm_device_model_startup > and lightly edited it. This is a cardinal sin in programming, known > as "clone and hack". I moved the device model specific functions and made them generic. Perhaps I should have merged the add+use patches (15+16 / 17+18) into a single change. Once all patches are applied I see no code duplication. If you prefer I can send a series just for the spawn related changes in libxl. Olaf