Re: [PATCH 12/17] virDomainChrDefParseXML: Switch to virXMLPropEnumDefault()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/23/22 3:08 PM, Michal Privoznik wrote:
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 30ef5b7550..3432c83153 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2310,10 +2310,28 @@ qemuDomainObjPrivateXMLFormat(virBuffer *buf,
          case VIR_DOMAIN_CHR_TYPE_UNIX:
              monitorpath = priv->monConfig->data.nix.path;
              break;
-        default:
          case VIR_DOMAIN_CHR_TYPE_PTY:
              monitorpath = priv->monConfig->data.file.path;
              break;
+        case VIR_DOMAIN_CHR_TYPE_NULL:
+        case VIR_DOMAIN_CHR_TYPE_VC:
+        case VIR_DOMAIN_CHR_TYPE_DEV:
+        case VIR_DOMAIN_CHR_TYPE_FILE:
+        case VIR_DOMAIN_CHR_TYPE_PIPE:
+        case VIR_DOMAIN_CHR_TYPE_STDIO:
+        case VIR_DOMAIN_CHR_TYPE_UDP:
+        case VIR_DOMAIN_CHR_TYPE_TCP:
+        case VIR_DOMAIN_CHR_TYPE_SPICEVMC:
+        case VIR_DOMAIN_CHR_TYPE_SPICEPORT:
+        case VIR_DOMAIN_CHR_TYPE_NMDM:
+        case VIR_DOMAIN_CHR_TYPE_QEMU_VDAGENT:
+        case VIR_DOMAIN_CHR_TYPE_DBUS:
+        case VIR_DOMAIN_CHR_TYPE_LAST:
+        default:
+            virReportError(VIR_ERR_INTERNAL_ERROR,
+                           _("unsupported monitor type '%s'"),
+                           virDomainChrTypeToString(priv->monConfig->type));
+            return -1;
          }
virBufferEscapeString(buf, "<monitor path='%s'", monitorpath);

Shouldn't this be a standalone patch for the fix?

--
Mit freundlichen Grüßen/Kind regards
   Boris Fiuczynski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Gregor Pillen
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux