[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 17 of 24] libxl: add libxl__spawn_confirm_offspring_startup



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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.