[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/6] snapshot: add error set function
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 2/6] snapshot: add error set function |
Date: |
Thu, 20 Dec 2012 14:36:34 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
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); \
> + } \
> + error_set(err, ERROR_CLASS_GENERIC_ERROR, fmt, ## __VA_ARGS__); \
> +} while (/*CONSTCOND*/0)
qemu-queue.h is the only other file in qemu.git that uses /*CONSTCOND*/
notation, and that's because of the file origins; do we really need it here?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 0/6] snapshot: take snapshots in unified way, Wenchao Xia, 2012/12/17
- [Qemu-devel] [PATCH 2/6] snapshot: add error set function, Wenchao Xia, 2012/12/17
- Re: [Qemu-devel] [PATCH 2/6] snapshot: add error set function,
Eric Blake <=
- [Qemu-devel] [PATCH 5/6] snapshot: qmp interface, Wenchao Xia, 2012/12/17
- [Qemu-devel] [PATCH 1/6] snapshot: export function in block.c, Wenchao Xia, 2012/12/17
- [Qemu-devel] [PATCH 6/6] snapshot: human monitor interface, Wenchao Xia, 2012/12/17
- [Qemu-devel] [PATCH 4/6] snapshot: implemention of common API to take snapshots, Wenchao Xia, 2012/12/17