|
From: | Wenchao Xia |
Subject: | Re: [Qemu-devel] [PATCH V3 4/4] block: dump snapshot and image info to specified output |
Date: | Tue, 28 May 2013 10:09:26 +0800 |
User-agent: | Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 |
δΊ 2013-5-27 23:40, Kevin Wolf ει:
Am 27.05.2013 um 17:02 hat Luiz Capitulino geschrieben:On Sat, 25 May 2013 11:09:45 +0800 Wenchao Xia <address@hidden> wrote:bdrv_snapshot_dump() and bdrv_image_info_dump() do not dump to a buffer now, some internal buffers are still used for format control, which have no chance to be truncated. As a result, these two functions have no more issue of truncation, and they can be used by both qemu and qemu-img with correct parameter specified. Signed-off-by: Wenchao Xia <address@hidden>I don't like the casting and the void pointers very much, but I can't suggest anything better:Maybe introduce and use a different function pointer type that explicitly takes void* instead of FILE*. You'd still have to cast the function pointers (and now actually in all instances), but then at least nobody can accidentally misinterpret a Monitor* as FILE*. Kevin
You mean change typedef int (*fprintf_function)(FILE *f, const char *fmt, ...) GCC_FMT_ATTR(2, 3); to typedef int (*fprintf_function)(void *out, const char *fmt, ...) GCC_FMT_ATTR(2, 3); ? -- Best Regards Wenchao Xia
[Prev in Thread] | Current Thread | [Next in Thread] |