qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v7 0/2] Return error reasons to caller when calling


From: zhanghailiang
Subject: [Qemu-devel] [PATCH v7 0/2] Return error reasons to caller when calling qmp_dump_guest_memory
Date: Tue, 30 Sep 2014 17:20:47 +0800

Hi,

In original code, Function dump_error ignores its second parameter which 
contains
error reason, it is better to return the error message to the caller.

Here we use error_setg to return the error info to caller.
And at the same time, we turn functions like write_elf64_note() to void,
Because functions shouldn't return an error code _and_ an Error object.
After this modification the code will be more clean. 

v6 -> v7
- Change the commit message for the first patch (Markus Armbruster)
- Add Reviewed-by
- Remove redundant check for local_err (Markus Armbruster)
v5 -> v6
- Don't check *errp directly, if errp is NULL, there will be an error,
  Instead, check a local variable *local_err (Markus Armbruster) 
v4 -> v5:
- Turn functions like write_elf64_note() to void (Luiz Capitulino)
v3 -> v4:
- Adjust the errp argument to the end 
- Remove trailing '.' in error messages
v2 -> v3:
- Drop the '\n' in the message when call dump_error (Eric Blake) 
v1 -> v2:
- Return the error reason to the caller (Luiz Capitulino)

Thanks for review!;)

zhanghailiang (2):
  dump: Propagate errors into qmp_dump_guest_memory()
  dump: Turn some functions to void to make code cleaner

 dump.c | 384 ++++++++++++++++++++++++++++++-----------------------------------
 1 file changed, 178 insertions(+), 206 deletions(-)

-- 
1.7.12.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]