[libvirt] [PATCH 1/3] qemu: Allow to specify the sysfs root for qemuBuildCommandLine

Daniel P. Berrange berrange at redhat.com
Thu May 16 08:34:32 UTC 2013


On Wed, May 15, 2013 at 01:09:44PM -0400, Laine Stump wrote:
> On 05/15/2013 07:23 AM, Osier Yang wrote:
> > On 15/05/13 19:09, Daniel P. Berrange wrote:
> >> Instead of
> >> adding many parameters to the API, we could provide a struct
> >
> > Agreed, many params is always not good. .
> >
> >> containing all the various callbacks needed in one go.
> >>
> >> Daniel
> 
> Maybe each device object could have a "hidden" part (i.e. not
> necessarily visible in the XML) that can be setup before calling
> qemuBuildCommandLine(), and qemuBuildCommandline could use that info if
> it's there, otherwise fills in "null" args on the commandline.
> 
> I'm not against using a callback when it's appropriate, but I think they
> hinder proper understanding of code by newcomers, and should be used
> sparingly unless necessary.

I'm strongly against adding any driver specific data to the "def"
objects. They should be exclusively used for representing the XML
configuration data, that is agnostic to any particular driver.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list