[libvirt] [PATCH] Support physical memory in virDomainMemoryPeek()

Nguyen Anh Quynh aquynh at gmail.com
Wed Jul 22 07:56:53 UTC 2009


On Wed, Jul 22, 2009 at 4:44 PM, Daniel Veillard<veillard at redhat.com> wrote:
> On Wed, Jul 22, 2009 at 04:27:45PM +0900, Nguyen Anh Quynh wrote:
>> On Wed, Jul 22, 2009 at 4:19 PM, Nguyen Anh Quynh<aquynh at gmail.com> wrote:
>> Acutally, to avoid all those ugly sanity checks, it is best to define
>
>  S/ugly/sane/
>
>> VIR_MEMORY_* as an enum type, then redefine virDomainMemoryCheck() as
>> (note the last param is changed):
>>
>> int virDomainMemoryPeek (virDomainPtr dom,
>>                                              unsigned long long start,
>>                                              size_t size,
>>                                              void *buffer,
>>                                              enum virDomainMemoryFlags flags);
>>
>
>  That is ugly, it's also wrong, it break API and ABI compatibility,
> forget about it !
>
>> Let me know your idea about this.
>
>  If more C was implemented with defensive programming, and if people
> didn't broke API every time they think "it would be nicer" then it
> would be way easier to actually develop in C ! Please change your
> mindset that just doesn't work in the long term, sorry ...

Please take this new patch.

Thank you,
Quynh


$ diffstat pmemsave4.diff
 include/libvirt/libvirt.h.in |    1 +
 src/libvirt.c                |   14 ++++++++------
 src/qemu_driver.c            |   15 ++++++++++-----
 3 files changed, 19 insertions(+), 11 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pmemsave4.diff
Type: text/x-diff
Size: 3997 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20090722/878d5fc8/attachment-0001.bin>


More information about the libvir-list mailing list