
On 11/01/2010 03:39 PM, Eric Blake wrote:
+ for (i = 0 ; !chr && i < vm->def->nserials ; i++) { + if (STREQ(devname, vm->def->serials[i]->info.alias)) + chr = vm->def->serials[i]; + }
Are we guaranteed that all devices will have a non-NULL and unique alias,
You answered this...
+ if (!chr) { + qemuReportError(VIR_ERR_INTERNAL_ERROR, + _("cannot find character device %s"), devname);
NULLSTR(devname)
+ goto cleanup; + } + + if (chr->type != VIR_DOMAIN_CHR_TYPE_PTY) { + qemuReportError(VIR_ERR_INTERNAL_ERROR, + _("character device %s is not using a PTY"), devname);
NULLSTR(devname)
But these two fixes still need to be made, since devname is allowed to be NULL. ACK, with those fixes. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org