[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V5 5/5] libqblock test example
From: |
wenchao xia |
Subject: |
Re: [Qemu-devel] [PATCH V5 5/5] libqblock test example |
Date: |
Fri, 05 Oct 2012 19:20:15 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 |
δΊ 2012-10-3 20:21, Paolo Bonzini ει:
> Il 03/10/2012 13:31, wenchao xia ha scritto:
>>>> +const uint64_t *qb_get_virt_size(const QBlockStaticInfo *info)
>>>> +{
>>>> + return info->member_addr->virt_size;
>>>
>>> Please change this to:
>>>
>>> QBlockStaticInfoAddr addrs;
>>> qb_setup_info_addr(info, &addrs);
>>> return *addrs->virt_size;
>>>
>>> and similarly for the others.
>>>
>>> QBlockStaticInfoAddr should not be a public struct. I'm sorry if this
>>> wasn't clear.
>>>
>>> I'll review the rest on Monday.
>>>
>>> Paolo
>>>
>> Hi, QBlockStaticInfoAddr was declared as a pointer, user can't see
>> what it really is. It is actually defined in internal header files.
>
> Yes, but even the type should be hidden. It should be purely an
> implementation detail, at least for now, to hide the switch in a single
> function.
>
> Paolo
>
OK, then I'll remove it. Do you think there is other things need to
be modified?