]> xenbits.xensource.com Git - libvirt.git/commitdiff
Use tristate constants for new 'append' field
authorDmitry Mishin <dim@virtuozzo.com>
Tue, 5 Jan 2016 12:25:38 +0000 (07:25 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 5 Jan 2016 12:59:17 +0000 (07:59 -0500)
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
src/qemu/qemu_command.c

index f210c0b224269140dae73dad01ee41c5b082facc..7cafb5ff613e7dc463f84a7d5f733077e6dbc4b1 100644 (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);
index d40198128d4d04f94c18d16d02f768cad64a2fab..89835a679b04d804aaeb789cb3d0d976c397a8bc 100644 (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"));