On 01/14/2011 06:46 AM, Daniel P. Berrange wrote:
> On Fri, Jan 14, 2011 at 12:41:13PM +0000, Daniel P. Berrange wrote:
>> On Thu, Jan 13, 2011 at 05:34:37PM -0700, Eric Blake wrote:
>>
>>> +            virCommandAddArgBuffer(cmd, &smartcard_buf);
>>> +            break;
>>> +        case VIR_DOMAIN_SMARTCARD_TYPE_PASSTHROUGH:
>>> +            virCommandAddArg(cmd, "-chardev");
>>> +            if (!(devstr = 
>>> qemuBuildChrChardevStr(&smartcard->data.passthru,
>>> +                                                  smartcard->info.alias)))
>>> +                    goto error;
>>
>> The 'id' setting for the chardev should really have a prefix
>> on it, because we won't want it to be the same as the 'id'
>> setting used for the -device option.
> 
> This is in fact a pre-existing flaw in our chardev handling
> which we need to fix. The 'qemuBuildChrChardevStr' API & its
> callers are buggy. They takes the assigned alias from the XML
> and use it directly for the chardev. So we end up with
> 
>    -chardev pty,id=$alias
>    -device isa-serial,chardev=$alias

Another big flaw in our chardev handling is that we haven't yet got any
support in qemuDomainXMLToNative for parsing -chardev, which means it
all shows up as qemu:command elements instead.  The last time we were
able to convert from qemu command line back to XML was for qemu 0.11.x.

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to