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:
parent
8cbd91a449
commit
8746d95f6d
@ -20071,7 +20071,7 @@ virDomainChrSourceDefFormat(virBufferPtr buf,
|
|||||||
virBufferEscapeString(buf, "<source path='%s'",
|
virBufferEscapeString(buf, "<source path='%s'",
|
||||||
def->data.file.path);
|
def->data.file.path);
|
||||||
if (def->type == VIR_DOMAIN_CHR_TYPE_FILE &&
|
if (def->type == VIR_DOMAIN_CHR_TYPE_FILE &&
|
||||||
def->data.file.append)
|
def->data.file.append != VIR_TRISTATE_SWITCH_ABSENT)
|
||||||
virBufferAsprintf(buf, " append='%s'",
|
virBufferAsprintf(buf, " append='%s'",
|
||||||
virTristateSwitchTypeToString(def->data.file.append));
|
virTristateSwitchTypeToString(def->data.file.append));
|
||||||
virDomainSourceDefFormatSeclabel(buf, nseclabels, seclabels, flags);
|
virDomainSourceDefFormatSeclabel(buf, nseclabels, seclabels, flags);
|
||||||
|
@ -6555,7 +6555,7 @@ qemuBuildChrChardevStr(virDomainChrSourceDefPtr dev, const char *alias,
|
|||||||
case VIR_DOMAIN_CHR_TYPE_FILE:
|
case VIR_DOMAIN_CHR_TYPE_FILE:
|
||||||
virBufferAsprintf(&buf, "file,id=char%s,path=%s", alias,
|
virBufferAsprintf(&buf, "file,id=char%s,path=%s", alias,
|
||||||
dev->data.file.path);
|
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)) {
|
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV_FILE_APPEND)) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
_("append not supported in this QEMU binary"));
|
_("append not supported in this QEMU binary"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user