]> xenbits.xensource.com Git - libvirt.git/commitdiff
spice: don't force user to specify spicevmc channel
authorMartin Kletzander <mkletzan@redhat.com>
Fri, 31 Jan 2014 10:53:25 +0000 (11:53 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 3 Feb 2014 08:46:47 +0000 (09:46 +0100)
We support only one spicevmc channel name anyway and the code is
prepared to use the default one, there's only one check missing.  It
is also mentioned in the documentation already and helps defining
domains with spice vdagent for people using virsh.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/qemu/qemu_command.c

index e1ff2872209de43a5d9591d7096ca887ed429df3..5b94de13750d83fd408a7b971bf4bc6f89cca672 100644 (file)
@@ -6134,7 +6134,8 @@ qemuBuildVirtioSerialPortDevStr(virDomainChrDefPtr dev,
 
     if (dev->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL &&
         dev->source.type == VIR_DOMAIN_CHR_TYPE_SPICEVMC &&
-        STRNEQ_NULLABLE(dev->target.name, "com.redhat.spice.0")) {
+        dev->target.name &&
+        STRNEQ(dev->target.name, "com.redhat.spice.0")) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                        _("Unsupported spicevmc target name '%s'"),
                        dev->target.name);