[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 09/11] tpm: Remove superfluous '\n' around error_rep
From: |
arei.gonglei |
Subject: |
[Qemu-devel] [PATCH 09/11] tpm: Remove superfluous '\n' around error_report() |
Date: |
Wed, 11 Feb 2015 12:12:12 +0800 |
From: Gonglei <address@hidden>
Signed-off-by: Gonglei <address@hidden>
---
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 c371023..0541535 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;
}
--
1.7.12.4
- [Qemu-devel] [PATCH 00/11] trivial: Remove superfluous '\n' around error_report/error_setg, arei.gonglei, 2015/02/10
- [Qemu-devel] [PATCH 05/11] Remove superfluous '\n' around error_report(), arei.gonglei, 2015/02/10
- [Qemu-devel] [PATCH 03/11] pl330.c: remove superfluous '\n' around error_setg, arei.gonglei, 2015/02/10
- [Qemu-devel] [PATCH 09/11] tpm: Remove superfluous '\n' around error_report(),
arei.gonglei <=
- [Qemu-devel] [PATCH 08/11] xtensa: Remove superfluous '\n' around error_report(), arei.gonglei, 2015/02/10
- [Qemu-devel] [PATCH 10/11] arm/digic_boards: Remove superfluous '\n' around error_report(), arei.gonglei, 2015/02/10
- [Qemu-devel] [PATCH 04/11] numa: remove superfluous '\n' around error_setg, arei.gonglei, 2015/02/10
- [Qemu-devel] [PATCH 01/11] block: remove superfluous '\n' around error_report/error_setg, arei.gonglei, 2015/02/10
- [Qemu-devel] [PATCH 02/11] a9gtimer: remove superfluous '\n' around error_setg, arei.gonglei, 2015/02/10
- [Qemu-devel] [PATCH 07/11] vfio: Remove superfluous '\n' around error_report(), arei.gonglei, 2015/02/10
- [Qemu-devel] [PATCH 11/11] vhost: Remove superfluous '\n' around error_report(), arei.gonglei, 2015/02/10
- [Qemu-devel] [PATCH 06/11] vhost-scsi: Remove superfluous '\n' around error_report(), arei.gonglei, 2015/02/10
- Re: [Qemu-devel] [PATCH 00/11] trivial: Remove superfluous '\n' around error_report/error_setg, Markus Armbruster, 2015/02/11