[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 20/47] tpm: Remove superfluous '\n' around error_repo
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [PULL 20/47] tpm: Remove superfluous '\n' around error_report() |
Date: |
Wed, 4 Mar 2015 20:06:37 +0300 |
From: Gonglei <address@hidden>
Signed-off-by: Gonglei <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Michael Tokarev <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 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
- [Qemu-devel] [PULL 46/47] gdbstub: avoid possible NULL pointer dereference, (continued)
- [Qemu-devel] [PULL 46/47] gdbstub: avoid possible NULL pointer dereference, Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 11/47] qmp-commands.hx: Fix several typos, Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 08/47] cutils: refine strtol error handling in parse_debug_env, Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 28/47] qemu-char: add cyrillic key 'numerosign' to Russian keymap, Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 16/47] Remove superfluous '\n' around error_report(), Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 43/47] migration: Fix coding style (whitespace issues), Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 13/47] a9gtimer: remove superfluous '\n' around error_setg, Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 21/47] arm/digic_boards: Remove superfluous '\n' around error_report(), Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 09/47] Add copyright and author after file split, Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 30/47] sparc/leon3.c: fix memory leak, Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 20/47] tpm: Remove superfluous '\n' around error_report(),
Michael Tokarev <=
- [Qemu-devel] [PULL 26/47] qapi-schema: Fix SpiceChannel docs, Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 42/47] oslib-posix: Fix compiler warning (-Wclobbered) and simplify the code, Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 01/47] xen-pt: fix Negative array index read, Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 14/47] pl330.c: remove superfluous '\n' around error_setg, Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 07/47] qemu-options: fix/document -incoming options, Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 18/47] vfio: Remove superfluous '\n' around error_report(), Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 45/47] milkymist-pfpu: fix GCC 5.0.0 aggressive-loop-optimizations warning, Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 22/47] vhost: Remove superfluous '\n' around error_report(), Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 33/47] sysbus: fix memory leak, Michael Tokarev, 2015/03/04
- [Qemu-devel] [PULL 31/47] macio: fix possible memory leak, Michael Tokarev, 2015/03/04