qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v9 3/3] virtio-console: Add a new virtserialport


From: Amit Shah
Subject: Re: [Qemu-devel] [PATCH v9 3/3] virtio-console: Add a new virtserialport device for generic serial port support
Date: Wed, 21 Oct 2009 09:14:56 +0530
User-agent: Mutt/1.5.19 (2009-01-05)

On (Tue) Oct 20 2009 [16:02:16], Gerd Hoffmann wrote:
> On 10/20/09 11:48, Amit Shah wrote:
>> On (Tue) Oct 20 2009 [10:51:30], Gerd Hoffmann wrote:
>>>> @@ -107,3 +107,41 @@ static void virtcon_register(void)
>>>>        virtio_serial_port_qdev_register(&virtcon_info);
>>>>    }
>>>>    device_init(virtcon_register)
>>>
>>>> +static VirtIOSerialPortInfo virtserial_port_info = {
>>>> +    .qdev.name     = "virtserialport",
>>>> +    .qdev.size     = sizeof(VirtConsole),
>>>> +    .init          = virtserial_port_initfn,
>>>> +    .have_data     = flush_buf,
>>>> +    .qdev.props = (Property[]) {
>>>> +        DEFINE_PROP_CHR("chardev", VirtConsole, chr),
>>>> +        DEFINE_PROP_STRING("name", VirtIOSerialPort, name),
>>>
>>> likewise: DEFINE_PROP_STRING("name", VirtConsole, port.name),
>>
>> The 'name' field is common to all ports, so it makes sense to put it in
>> the VirtIOSerialPort struct. (Internal users can pre-define it to their
>> liking, eg, org.qemu.vnc)
>
> Sure.  I don't want to move it out there.  But the driver state struct  
> is 'VirtConsole' so all properties should use that.  Note that the field  
> changed too: from "name" to "port.name", so everything keeps working ;)

Ah; I understand it now. Sorry for the confusion.

Thanks Gerd for the reviews.

                Amit




reply via email to

[Prev in Thread] Current Thread [Next in Thread]