From: Martin Kletzander Date: Fri, 31 Jan 2014 10:53:25 +0000 (+0100) Subject: spice: don't force user to specify spicevmc channel X-Git-Tag: v1.2.2-rc1~189 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b44f9e7ec93a5f7ea10aae49491307d3cef698bc;p=thirdparty%2Flibvirt.git spice: don't force user to specify spicevmc channel 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 --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index e1ff287220..5b94de1375 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -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);