const char *modelName = NULL;
virBuffer childBuf = VIR_BUFFER_INITIALIZER;
- virBufferAdjustIndent(&childBuf, virBufferGetIndent(buf, false) + 2);
+ virBufferSetChildIndent(&childBuf, buf);
if (!type) {
virReportError(VIR_ERR_INTERNAL_ERROR,
virBuffer childBuf = VIR_BUFFER_INITIALIZER;
size_t i;
- virBufferAdjustIndent(&childBuf, virBufferGetIndent(buf, false) + 2);
+ virBufferSetChildIndent(&childBuf, buf);
if (!mode) {
virReportError(VIR_ERR_INTERNAL_ERROR,
virBuffer childBuf = VIR_BUFFER_INITIALIZER;
size_t i;
- virBufferAdjustIndent(&childBuf, virBufferGetIndent(buf, false) + 2);
+ virBufferSetChildIndent(&childBuf, buf);
if (!model) {
virReportError(VIR_ERR_INTERNAL_ERROR,
{
const char *model = virDomainMemballoonModelTypeToString(def->model);
virBuffer childrenBuf = VIR_BUFFER_INITIALIZER;
- int indent = virBufferGetIndent(buf, false);
if (!model) {
virReportError(VIR_ERR_INTERNAL_ERROR,
virBufferAsprintf(buf, " autodeflate='%s'",
virTristateSwitchTypeToString(def->autodeflate));
- virBufferAdjustIndent(&childrenBuf, indent + 2);
+ virBufferSetChildIndent(&childrenBuf, buf);
if (def->period)
virBufferAsprintf(&childrenBuf, "<stats period='%i'/>\n", def->period);
const char *action = virDomainWatchdogActionTypeToString(def->action);
virBuffer childBuf = VIR_BUFFER_INITIALIZER;
- virBufferAdjustIndent(&childBuf, virBufferGetIndent(buf, false) + 2);
+ virBufferSetChildIndent(&childBuf, buf);
if (!model) {
virReportError(VIR_ERR_INTERNAL_ERROR,
virDomainPanicDefPtr def)
{
virBuffer childrenBuf = VIR_BUFFER_INITIALIZER;
- int indent = virBufferGetIndent(buf, false);
virBufferAddLit(buf, "<panic");
virBufferAsprintf(buf, " model='%s'",
virDomainPanicModelTypeToString(def->model));
- virBufferAdjustIndent(&childrenBuf, indent + 2);
+ virBufferSetChildIndent(&childrenBuf, buf);
virDomainDeviceInfoFormat(&childrenBuf, &def->info, 0);
if (virBufferCheckError(&childrenBuf) < 0)
virBufferAsprintf(buf, "<input type='%s' bus='%s'",
type, bus);
- virBufferAdjustIndent(&childbuf, virBufferGetIndent(buf, false) + 2);
+ virBufferSetChildIndent(&childbuf, buf);
virDomainVirtioOptionsFormat(&driverBuf, def->virtio);
if (virBufferCheckError(&driverBuf) < 0)
return -1;
const char *type = virDomainHubTypeToString(def->type);
virBuffer childBuf = VIR_BUFFER_INITIALIZER;
- virBufferAdjustIndent(&childBuf, virBufferGetIndent(buf, false) + 2);
+ virBufferSetChildIndent(&childBuf, buf);
if (!type) {
virReportError(VIR_ERR_INTERNAL_ERROR,
virBuffer childrenBuf = VIR_BUFFER_INITIALIZER;
int ret = -1;
- virBufferAdjustIndent(&childrenBuf, virBufferGetIndent(buf, false) + 2);
+ virBufferSetChildIndent(&childrenBuf, buf);
if (def->cputune.sharesSpecified)
virBufferAsprintf(&childrenBuf, "<shares>%llu</shares>\n",
{
virBuffer childBuf = VIR_BUFFER_INITIALIZER;
- virBufferAdjustIndent(&childBuf, virBufferGetIndent(buf, false) + 2);
+ virBufferSetChildIndent(&childBuf, buf);
if (iommu->intremap != VIR_TRISTATE_SWITCH_ABSENT ||
iommu->caching_mode != VIR_TRISTATE_SWITCH_ABSENT ||
int n;
size_t i;
virBuffer childrenBuf = VIR_BUFFER_INITIALIZER;
- int indent;
char *netprefix = NULL;
virCheckFlags(VIR_DOMAIN_DEF_FORMAT_COMMON_FLAGS |
def->mem.cur_balloon);
/* start format blkiotune */
- indent = virBufferGetIndent(buf, false);
- virBufferAdjustIndent(&childrenBuf, indent + 2);
+ virBufferSetChildIndent(&childrenBuf, buf);
if (def->blkio.weight)
virBufferAsprintf(&childrenBuf, "<weight>%u</weight>\n",
def->blkio.weight);