From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z771l-0005lC-Q9 for qemu-devel@nongnu.org; Mon, 22 Jun 2015 15:05:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z771f-0002Pe-Hw for qemu-devel@nongnu.org; Mon, 22 Jun 2015 15:05:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z771f-0002PM-Bf for qemu-devel@nongnu.org; Mon, 22 Jun 2015 15:04:59 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 050538F28F for ; Mon, 22 Jun 2015 19:04:59 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-65.ams2.redhat.com [10.36.116.65]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5MJ4uXR022314 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 22 Jun 2015 15:04:58 -0400 From: Markus Armbruster Date: Mon, 22 Jun 2015 21:04:44 +0200 Message-Id: <1434999889-849-20-git-send-email-armbru@redhat.com> In-Reply-To: <1434999889-849-1-git-send-email-armbru@redhat.com> References: <1434999889-849-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PULL 19/24] tpm: Avoid qerror_report() outside QMP command handlers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org qerror_report() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. Replace by error_report(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Luiz Capitulino --- tpm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tpm.c b/tpm.c index 8dadc67..c8889fa 100644 --- a/tpm.c +++ b/tpm.c @@ -140,22 +140,21 @@ static int configure_tpm(QemuOpts *opts) id = qemu_opts_id(opts); if (id == NULL) { - qerror_report(ERROR_CLASS_GENERIC_ERROR, QERR_MISSING_PARAMETER, "id"); + error_report(QERR_MISSING_PARAMETER, "id"); return 1; } value = qemu_opt_get(opts, "type"); if (!value) { - qerror_report(ERROR_CLASS_GENERIC_ERROR, QERR_MISSING_PARAMETER, - "type"); + error_report(QERR_MISSING_PARAMETER, "type"); tpm_display_backend_drivers(); return 1; } be = tpm_get_backend_driver(value); if (be == NULL) { - qerror_report(ERROR_CLASS_GENERIC_ERROR, QERR_INVALID_PARAMETER_VALUE, - "type", "a TPM backend type"); + error_report(QERR_INVALID_PARAMETER_VALUE, + "type", "a TPM backend type"); tpm_display_backend_drivers(); return 1; } -- 1.9.3