diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index a7be74572a..36e4e066ba 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -4299,7 +4299,7 @@ libxlDomainOpenConsole(virDomainPtr dom, if (chr->source.type != VIR_DOMAIN_CHR_TYPE_PTY) { virReportError(VIR_ERR_INTERNAL_ERROR, _("character device %s is not using a PTY"), - NULLSTR(dev_name)); + dev_name ? dev_name : NULLSTR(chr->info.alias)); goto cleanup; } diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 31fb47071f..cc1277bddc 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -3484,7 +3484,8 @@ lxcDomainOpenConsole(virDomainPtr dom, if (chr->source.type != VIR_DOMAIN_CHR_TYPE_PTY) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("character device %s is not using a PTY"), dev_name); + _("character device %s is not using a PTY"), + dev_name ? dev_name : NULLSTR(chr->info.alias)); goto cleanup; } diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index c1373de6ec..1e3caf4a52 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -15958,7 +15958,7 @@ qemuDomainOpenConsole(virDomainPtr dom, if (chr->source.type != VIR_DOMAIN_CHR_TYPE_PTY) { virReportError(VIR_ERR_INTERNAL_ERROR, _("character device %s is not using a PTY"), - NULLSTR(dev_name)); + dev_name ? dev_name : NULLSTR(chr->info.alias)); goto cleanup; } @@ -16032,7 +16032,7 @@ qemuDomainOpenChannel(virDomainPtr dom, if (chr->source.type != VIR_DOMAIN_CHR_TYPE_UNIX) { virReportError(VIR_ERR_INTERNAL_ERROR, _("channel %s is not using a UNIX socket"), - NULLSTR(name)); + name ? name : NULLSTR(chr->info.alias)); goto cleanup; } diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index f09e79b1f3..7a95458119 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -2640,7 +2640,8 @@ umlDomainOpenConsole(virDomainPtr dom, if (chr->source.type != VIR_DOMAIN_CHR_TYPE_PTY) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("character device %s is not using a PTY"), dev_name); + _("character device %s is not using a PTY"), + dev_name ? dev_name : NULLSTR(chr->info.alias)); goto cleanup; } diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c index da9e6f4e8a..ce31f0f883 100644 --- a/src/xen/xen_driver.c +++ b/src/xen/xen_driver.c @@ -2705,7 +2705,8 @@ xenUnifiedDomainOpenConsole(virDomainPtr dom, if (chr->source.type != VIR_DOMAIN_CHR_TYPE_PTY) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("character device %s is not using a PTY"), dev_name); + _("character device %s is not using a PTY"), + dev_name ? dev_name : NULLSTR(chr->info.alias)); goto cleanup; }