Received: from eggs.gnu.org ([2001:4830:134:3::10]:40345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YU114-0008W5-1d for qemu-devel@nongnu.org; Fri, 06 Mar 2015 17:46:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YU10v-00037u-US for qemu-devel@nongnu.org; Fri, 06 Mar 2015 17:46:45 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:35319) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YU10v-00037n-HX for qemu-devel@nongnu.org; Fri, 06 Mar 2015 17:46:37 -0500 From: Michael Tokarev Date: Fri, 6 Mar 2015 23:19:04 +0300 Message-Id: <1425673176-9819-26-git-send-email-mjt@msgid.tls.msk.ru> In-Reply-To: <1425673176-9819-1-git-send-email-mjt@tls.msk.ru> References: <1425673176-9819-1-git-send-email-mjt@tls.msk.ru> Subject: [Qemu-devel] [PATCH 19/51] tpm: Remove superfluous '\n' around error_report() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Aneesh Kumar K.V" Cc: Gonglei , Michael Tokarev , qemu-devel@nongnu.org From: Gonglei Signed-off-by: Gonglei Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- hw/tpm/tpm_passthrough.c | 12 ++++++------ tpm.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c index 2bf3c6f..13ac1d2 100644 --- a/hw/tpm/tpm_passthrough.c +++ b/hw/tpm/tpm_passthrough.c @@ -126,7 +126,7 @@ static int tpm_passthrough_unix_tx_bufs(TPMPassthruState *tpm_pt, if (!tpm_pt->tpm_op_canceled || (tpm_pt->tpm_op_canceled && errno != ECANCELED)) { error_report("tpm_passthrough: error while transmitting data " - "to TPM: %s (%i)\n", + "to TPM: %s (%i)", strerror(errno), errno); } goto err_exit; @@ -139,14 +139,14 @@ static int tpm_passthrough_unix_tx_bufs(TPMPassthruState *tpm_pt, if (!tpm_pt->tpm_op_canceled || (tpm_pt->tpm_op_canceled && errno != ECANCELED)) { error_report("tpm_passthrough: error while reading data from " - "TPM: %s (%i)\n", + "TPM: %s (%i)", strerror(errno), errno); } } else if (ret < sizeof(struct tpm_resp_hdr) || tpm_passthrough_get_size_from_buffer(out) != ret) { ret = -1; error_report("tpm_passthrough: received invalid response " - "packet from TPM\n"); + "packet from TPM"); } err_exit: @@ -282,7 +282,7 @@ static void tpm_passthrough_cancel_cmd(TPMBackend *tb) if (tpm_pt->cancel_fd >= 0) { n = write(tpm_pt->cancel_fd, "-", 1); if (n != 1) { - error_report("Canceling TPM command failed: %s\n", + error_report("Canceling TPM command failed: %s", strerror(errno)); } else { tpm_pt->tpm_op_canceled = true; @@ -413,13 +413,13 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb) tpm_pt->tpm_fd = qemu_open(tpm_pt->tpm_dev, O_RDWR); if (tpm_pt->tpm_fd < 0) { - error_report("Cannot access TPM device using '%s': %s\n", + error_report("Cannot access TPM device using '%s': %s", tpm_pt->tpm_dev, strerror(errno)); goto err_free_parameters; } if (tpm_passthrough_test_tpmdev(tpm_pt->tpm_fd)) { - error_report("'%s' is not a TPM device.\n", + error_report("'%s' is not a TPM device.", tpm_pt->tpm_dev); goto err_close_tpmdev; } diff --git a/tpm.c b/tpm.c index 4ffd9b9..963b7ee 100644 --- a/tpm.c +++ b/tpm.c @@ -134,7 +134,7 @@ static int configure_tpm(QemuOpts *opts) Error *local_err = NULL; if (!QLIST_EMPTY(&tpm_backends)) { - error_report("Only one TPM is allowed.\n"); + error_report("Only one TPM is allowed."); return 1; } -- 2.1.4