Re: [Qemu-devel] [PATCH 2/6] snapshot: add error set function

2013-01-05 Thread Wenchao Xia
于 2013-1-4 22:55, Stefan Hajnoczi 写道: On Mon, Dec 17, 2012 at 02:25:05PM +0800, Wenchao Xia wrote: This patch has nothing to do with snapshots, so snapshot: add error set function is not a useful commit message. error: add error_set_replace() would be okay. Please use git log filename on the

Re: [Qemu-devel] [PATCH 2/6] snapshot: add error set function

2013-01-04 Thread Stefan Hajnoczi
On Mon, Dec 17, 2012 at 02:25:05PM +0800, Wenchao Xia wrote: This patch has nothing to do with snapshots, so snapshot: add error set function is not a useful commit message. error: add error_set_replace() would be okay. Please use git log filename on the file you are modifying to find good

Re: [Qemu-devel] [PATCH 2/6] snapshot: add error set function

2012-12-20 Thread Eric Blake
On 12/16/2012 11:25 PM, Wenchao Xia wrote: Added two function which will try replace the error if it is already set, so only last error is reported. +#define error_setg_replace(err, fmt, ...) do { \ +if (*err != NULL) { \ +error_free(*err); \ + } \ +

Re: [Qemu-devel] [PATCH 2/6] snapshot: add error set function

2012-12-20 Thread Wenchao Xia
于 2012-12-21 5:36, Eric Blake 写道: On 12/16/2012 11:25 PM, Wenchao Xia wrote: Added two function which will try replace the error if it is already set, so only last error is reported. +#define error_setg_replace(err, fmt, ...) do { \ +if (*err != NULL) { \ +

[Qemu-devel] [PATCH 2/6] snapshot: add error set function

2012-12-16 Thread Wenchao Xia
Added two function which will try replace the error if it is already set, so only last error is reported. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- error.c | 23 +++ error.h |9 + 2 files changed, 32 insertions(+), 0 deletions(-) diff --git