于 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 on
the file
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 on
the file you are modifying to find good component
于 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) { \
+
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); \
> +
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
---
error.c | 23 +++
error.h |9 +
2 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/error.c b/error.c
index 128