From patchwork Thu Mar 19 09:05:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 451796 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B61581400D5 for ; Thu, 19 Mar 2015 20:15:02 +1100 (AEDT) Received: from localhost ([::1]:37888 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYWXc-0006Ns-SR for incoming@patchwork.ozlabs.org; Thu, 19 Mar 2015 05:15:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYWVP-0002FH-QH for qemu-devel@nongnu.org; Thu, 19 Mar 2015 05:12:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYWVJ-0007j2-My for qemu-devel@nongnu.org; Thu, 19 Mar 2015 05:12:43 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:34695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYWVJ-0007iY-FY; Thu, 19 Mar 2015 05:12:37 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 8F2C441E45; Thu, 19 Mar 2015 12:12:36 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.corpit.ru (Postfix) with SMTP id 5CD6F933; Thu, 19 Mar 2015 12:05:46 +0300 (MSK) Received: (nullmailer pid 351 invoked by uid 1000); Thu, 19 Mar 2015 09:05:44 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Thu, 19 Mar 2015 12:05:32 +0300 Message-Id: <198675491fcec79f6ebb5d85ccaa52beecd56e43.1426755483.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 86.62.121.231 Cc: qemu-trivial@nongnu.org, Michael Tokarev , zhanghailiang Subject: [Qemu-devel] [PULL 14/24] error: Replace error_report() & error_free() with error_report_err() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: zhanghailiang This is a continuation of the work started in commit 565f65d27: "error: Use error_report_err() where appropriate" Signed-off-by: zhanghailiang Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- hw/arm/virt.c | 2 +- savevm.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index b2eaea8..b652b07 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -771,7 +771,7 @@ static void machvirt_init(MachineState *machine) cc->parse_features(CPU(cpuobj), cpuopts, &err); g_free(cpuopts); if (err) { - error_report("%s", error_get_pretty(err)); + error_report_err(err); exit(1); } diff --git a/savevm.c b/savevm.c index e7d97ee..3b0e222 100644 --- a/savevm.c +++ b/savevm.c @@ -941,8 +941,7 @@ int qemu_loadvm_state(QEMUFile *f) int file_error_after_eof = -1; 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; }