From: Matthias Bolte Date: Wed, 20 Oct 2010 11:22:40 +0000 (+0200) Subject: Fix formatting of the memtune XML element X-Git-Tag: v0.8.5~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e05cdac855b9c812803167be4911b4e2276c0969;p=thirdparty%2Flibvirt.git Fix formatting of the memtune XML element Also output the min_guarantee element when set. --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a997e06429..6486f9cdb8 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6466,7 +6466,8 @@ char *virDomainDefFormat(virDomainDefPtr def, def->mem.cur_balloon); /* add memtune only if there are any */ - if(def->mem.hard_limit || def->mem.hard_limit || def->mem.hard_limit) + if (def->mem.hard_limit || def->mem.soft_limit || def->mem.min_guarantee || + def->mem.swap_hard_limit) virBufferVSprintf(&buf, " \n"); if (def->mem.hard_limit) { virBufferVSprintf(&buf, " %lu\n", @@ -6476,11 +6477,16 @@ char *virDomainDefFormat(virDomainDefPtr def, virBufferVSprintf(&buf, " %lu\n", def->mem.soft_limit); } + if (def->mem.min_guarantee) { + virBufferVSprintf(&buf, " %lu\n", + def->mem.min_guarantee); + } if (def->mem.swap_hard_limit) { virBufferVSprintf(&buf, " %lu\n", def->mem.swap_hard_limit); } - if(def->mem.hard_limit || def->mem.hard_limit || def->mem.hard_limit) + if (def->mem.hard_limit || def->mem.soft_limit || def->mem.min_guarantee || + def->mem.swap_hard_limit) virBufferVSprintf(&buf, " \n"); if (def->mem.hugepage_backed) {