From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4rkR-0008F6-TI for qemu-devel@nongnu.org; Tue, 16 Jun 2015 10:21:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4rkP-00035o-Oz for qemu-devel@nongnu.org; Tue, 16 Jun 2015 10:21:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41811) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4rkP-00035V-Jt for qemu-devel@nongnu.org; Tue, 16 Jun 2015 10:21:53 -0400 From: Markus Armbruster Date: Tue, 16 Jun 2015 16:21:42 +0200 Message-Id: <1434464507-13001-7-git-send-email-armbru@redhat.com> In-Reply-To: <1434464507-13001-1-git-send-email-armbru@redhat.com> References: <1434464507-13001-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH v2 06/11] 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 Cc: kwolf@redhat.com, mdroth@linux.vnet.ibm.com, stefanha@redhat.com, lcapitulino@redhat.com 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