1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

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.
This commit is contained in:
Dmitry Mishin 2016-01-05 07:25:38 -05:00 committed by John Ferlan
parent 8cbd91a449
commit 8746d95f6d
2 changed files with 2 additions and 2 deletions

View File

@ -20071,7 +20071,7 @@ virDomainChrSourceDefFormat(virBufferPtr buf,
virBufferEscapeString(buf, "<source path='%s'",
def->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);

View File

@ -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"));