[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 9/9 v2] Make monitor command 'dump-guest-memory'
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 9/9 v2] Make monitor command 'dump-guest-memory' dump in kdump-compressed format |
Date: |
Wed, 15 May 2013 06:10:35 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 |
On 05/14/2013 11:27 PM, Qiao Nuohan wrote:
>>> +static int dump_init(DumpState *s, int fd, bool compress_format,
>>> + DumpGuestMemoryFormat format, bool paging,
>>> + bool has_filter, int64_t begin, int64_t length,
>>> Error **errp)
>>> {
>>
>> Why do you need compress_format as a separate parameter, when that
>> information is redundant with the contents of format?
>
> I need this variable to decide whether in kdump-compressed format or
> not. Without using it, I need to repeat "has_format && format !=
> DUMP_GUEST_MEMORY_FORMAT_ELF" three times.
Then set it up as a local stack-allocated variable within the function
body. No need to pass it as part of the function signature, to make all
callers pass redundant information.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH 1/9 v2] Add API to manipulate dump_bitmap, (continued)
[Qemu-devel] [PATCH 2/9 v2] Add API to manipulate cache_data, Qiao Nuohan, 2013/05/14
[Qemu-devel] [PATCH 5/9 v2] Add API to create data of dump bitmap, Qiao Nuohan, 2013/05/14
[Qemu-devel] [PATCH 6/9 v2] Add API to create page, Qiao Nuohan, 2013/05/14
[Qemu-devel] [PATCH 8/9 v2] Add API to write header, bitmap and page into vmcore, Qiao Nuohan, 2013/05/14
[Qemu-devel] [PATCH 7/9 v2] Add API to free buf used by creating header, bitmap and page, Qiao Nuohan, 2013/05/14
[Qemu-devel] [PATCH 9/9 v2] Make monitor command 'dump-guest-memory' dump in kdump-compressed format, Qiao Nuohan, 2013/05/14