On Tue, Jun 17, 2014 at 03:18:25PM +0200, Ján Tomko wrote: > On 06/17/2014 03:06 PM, Daniel P. Berrange wrote: > > On Tue, Jun 17, 2014 at 03:03:36PM +0200, Ján Tomko wrote: > >> Reuse the common code from LXC and QEMU drivers. > >> --- > >> src/conf/domain_conf.c | 383 +++++++++++++++++++++++++++++++++++++++++++++++ > >> src/conf/domain_conf.h | 8 + > >> src/libvirt_private.syms | 1 + > >> src/lxc/lxc_driver.c | 374 +-------------------------------------------- > >> src/qemu/qemu_driver.c | 383 +---------------------------------------------- > >> 5 files changed, 400 insertions(+), 749 deletions(-) > >> > >> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > >> index 4114289..4fe7cb6 100644 > >> --- a/src/conf/domain_conf.c > >> +++ b/src/conf/domain_conf.c > >> @@ -19777,3 +19777,386 @@ virDomainObjSetMetadata(virDomainObjPtr vm, > >> > >> return 0; > >> } > >> + > >> +#define CONF_NB_BLKIO_PARAM 6 > >> + > >> +int > >> +virDomainGetBlkioParametersInternal(virCgroupPtr cgroup, > >> + virDomainDefPtr def, > >> + virDomainDefPtr persistentDef, > >> + virTypedParameterPtr params, > >> + int *nparams, > >> + unsigned int flags) > > > > This kind of code really does not belong in domain_config.c - it is > > nothing at all todo with domain XML parsing / formatting, and is very > > much Linux specific > > > > My first choice was util/vircgroup.c, but including domain_conf.h there felt > wrong. You'll need to introduce some new shared file that's not in util/ since util/ cannot depend on conf/ Regards, 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 :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list