diff mbox

[v2] error: Replace error_report() & error_free() with error_report_err()

Message ID 1425464754-8364-1-git-send-email-zhang.zhanghailiang@huawei.com
State New
Headers show

Commit Message

Zhanghailiang March 4, 2015, 10:25 a.m. UTC
This is a continuation of the work started in commit 565f65d27:
"error: Use error_report_err() where appropriate"

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
v2:
- Add Reviewd-by and commit message
---
 hw/arm/virt.c | 2 +-
 savevm.c      | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

Comments

Markus Armbruster March 4, 2015, 4:50 p.m. UTC | #1
zhanghailiang <zhang.zhanghailiang@huawei.com> writes:

> This is a continuation of the work started in commit 565f65d27:
> "error: Use error_report_err() where appropriate"
>
> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
> Reviewed-by: Eric Blake <eblake@redhat.com>

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Zhanghailiang March 10, 2015, 6:04 a.m. UTC | #2
Hi Michael,

This patch has been reviewed, Please consider for merging.

Thanks,
zhanghailiang

On 2015/3/5 0:50, Markus Armbruster wrote:
> zhanghailiang <zhang.zhanghailiang@huawei.com> writes:
>
>> This is a continuation of the work started in commit 565f65d27:
>> "error: Use error_report_err() where appropriate"
>>
>> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
>> Reviewed-by: Eric Blake <eblake@redhat.com>
>
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
>
>
Michael Tokarev March 10, 2015, 6:20 a.m. UTC | #3
04.03.2015 13:25, zhanghailiang wrote:
> This is a continuation of the work started in commit 565f65d27:
> "error: Use error_report_err() where appropriate"

Applied to -trivial, thank you!

/mjt
diff mbox

Patch

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 69f51ac..4732c12 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -768,7 +768,7 @@  static void machvirt_init(MachineState *machine)
         /* Handle any CPU options specified by the user */
         cc->parse_features(CPU(cpuobj), cpustr[1], &err);
         if (err) {
-            error_report("%s", error_get_pretty(err));
+            error_report_err(err);
             exit(1);
         }
 
diff --git a/savevm.c b/savevm.c
index ce2b6a2..c4f8c39 100644
--- a/savevm.c
+++ b/savevm.c
@@ -932,8 +932,7 @@  int qemu_loadvm_state(QEMUFile *f)
     int ret;
 
     if (qemu_savevm_state_blocked(&local_err)) {
-        error_report("%s", error_get_pretty(local_err));
-        error_free(local_err);
+        error_report_err(local_err);
         return -EINVAL;
     }