[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V4 2/5] libqblock type defines
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH V4 2/5] libqblock type defines |
Date: |
Fri, 28 Sep 2012 09:51:56 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 |
Il 28/09/2012 05:00, Wenchao Xia ha scritto:
>>
>>
>> uint64_t qblock_get_virt_size(QBlockFmtInfo *fmt);
>> QBlockProtInfo *qblock_get_backing_loc(QBlockFmtInfo *fmt);
>> bool qblock_get_encrypt(QBlockFmtInfo *fmt);
>>
>> etc. that include the switch statement.
>>
> I think it is reasonable use generic accessors instead of embbed
> structure, maybe an additional helper function should be added as:
>
> QBlockStaticInfoAddr *qblock_get_static_info_addr(QBlockStaticInfo
> *info)
>
> In this way only one switch statement is needed in source code,
> and only one new API is added.
No problem for the implementation, but please make this function static.
Paolo
- [Qemu-devel] [PATCH V4 0/5] libqblock qemu block layer library, Wenchao Xia, 2012/09/26
- [Qemu-devel] [PATCH V4 1/5] libqblock build system, Wenchao Xia, 2012/09/26
- [Qemu-devel] [PATCH V4 2/5] libqblock type defines, Wenchao Xia, 2012/09/26
- Re: [Qemu-devel] [PATCH V4 2/5] libqblock type defines, Paolo Bonzini, 2012/09/27
- Re: [Qemu-devel] [PATCH V4 2/5] libqblock type defines, Wenchao Xia, 2012/09/27
- Re: [Qemu-devel] [PATCH V4 2/5] libqblock type defines, Paolo Bonzini, 2012/09/27
- Re: [Qemu-devel] [PATCH V4 2/5] libqblock type defines, Wenchao Xia, 2012/09/27
- Re: [Qemu-devel] [PATCH V4 2/5] libqblock type defines,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH V4 2/5] libqblock type defines, Wenchao Xia, 2012/09/28
- Re: [Qemu-devel] [PATCH V4 2/5] libqblock type defines, Paolo Bonzini, 2012/09/28
[Qemu-devel] [PATCH V4 4/5] libqblock test build system, Wenchao Xia, 2012/09/26
- Re: [Qemu-devel] [PATCH V4 4/5] libqblock test build system, Paolo Bonzini, 2012/09/27
- Re: [Qemu-devel] [PATCH V4 4/5] libqblock test build system, Wenchao Xia, 2012/09/27
- Re: [Qemu-devel] [PATCH V4 4/5] libqblock test build system, Paolo Bonzini, 2012/09/27
- Re: [Qemu-devel] [PATCH V4 4/5] libqblock test build system, Wenchao Xia, 2012/09/27
- Re: [Qemu-devel] [PATCH V4 4/5] libqblock test build system, Paolo Bonzini, 2012/09/28
- Re: [Qemu-devel] [PATCH V4 4/5] libqblock test build system, Wenchao Xia, 2012/09/28
[Qemu-devel] [PATCH V4 5/5] libqblock test example, Wenchao Xia, 2012/09/26