From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3mJ1-000618-3D for qemu-devel@nongnu.org; Sat, 13 Jun 2015 10:21:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z3mIy-0004r8-Oh for qemu-devel@nongnu.org; Sat, 13 Jun 2015 10:21:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3mIy-0004r4-JT for qemu-devel@nongnu.org; Sat, 13 Jun 2015 10:21:04 -0400 From: Markus Armbruster Date: Sat, 13 Jun 2015 16:20:53 +0200 Message-Id: <1434205258-1932-7-git-send-email-armbru@redhat.com> In-Reply-To: <1434205258-1932-1-git-send-email-armbru@redhat.com> References: <1434205258-1932-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 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 --- tpm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tpm.c b/tpm.c index 99a9895..224e65e 100644 --- a/tpm.c +++ b/tpm.c @@ -140,23 +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