From 8746d95f6d437a7b408849fc09dfaa736b98966c Mon Sep 17 00:00:00 2001 From: Dmitry Mishin Date: Tue, 5 Jan 2016 07:25:38 -0500 Subject: [PATCH] Use tristate constants for new 'append' field For completeness, use the VIR_TRISTATE_SWITCH_ABSENT for data.file.append comparisons. Commit ids '70ffa02f' and '53a15aed' just went with the non zero comparison. --- src/conf/domain_conf.c | 2 +- src/qemu/qemu_command.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f210c0b224..7cafb5ff61 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -20071,7 +20071,7 @@ virDomainChrSourceDefFormat(virBufferPtr buf, virBufferEscapeString(buf, "data.file.path); if (def->type == VIR_DOMAIN_CHR_TYPE_FILE && - def->data.file.append) + def->data.file.append != VIR_TRISTATE_SWITCH_ABSENT) virBufferAsprintf(buf, " append='%s'", virTristateSwitchTypeToString(def->data.file.append)); virDomainSourceDefFormatSeclabel(buf, nseclabels, seclabels, flags); diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index d40198128d..89835a679b 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6555,7 +6555,7 @@ qemuBuildChrChardevStr(virDomainChrSourceDefPtr dev, const char *alias, case VIR_DOMAIN_CHR_TYPE_FILE: virBufferAsprintf(&buf, "file,id=char%s,path=%s", alias, dev->data.file.path); - if (dev->data.file.append) { + if (dev->data.file.append != VIR_TRISTATE_SWITCH_ABSENT) { if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV_FILE_APPEND)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("append not supported in this QEMU binary")); -- GitLab