|
|
43fe83 |
From 910a705253fc87dcd8fe0f1657a2466e14ccb5df Mon Sep 17 00:00:00 2001
|
|
|
43fe83 |
Message-Id: <910a705253fc87dcd8fe0f1657a2466e14ccb5df.1382534060.git.jdenemar@redhat.com>
|
|
|
43fe83 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
43fe83 |
Date: Thu, 10 Oct 2013 13:56:33 +0200
|
|
|
43fe83 |
Subject: [PATCH] qemu: process: Silence coverity warning when rewinding log
|
|
|
43fe83 |
file
|
|
|
43fe83 |
|
|
|
43fe83 |
https://bugzilla.redhat.com/show_bug.cgi?id=1001738
|
|
|
43fe83 |
|
|
|
43fe83 |
The change in ef29de14c37d14abc546e90555a0093797facfdd that introduced
|
|
|
43fe83 |
better error logging from qemu introduced a warning from coverity about
|
|
|
43fe83 |
unused return value from lseek. Silence this warning and fix typo in the
|
|
|
43fe83 |
corresponding error message.
|
|
|
43fe83 |
|
|
|
43fe83 |
Reported by: John Ferlan
|
|
|
43fe83 |
|
|
|
43fe83 |
(cherry picked from commit 59e21e973fdbfc9065ff5aa421ae36dbd1c4073a)
|
|
|
43fe83 |
|
|
|
43fe83 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
43fe83 |
---
|
|
|
43fe83 |
src/qemu/qemu_process.c | 4 ++--
|
|
|
43fe83 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
43fe83 |
|
|
|
43fe83 |
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
|
|
43fe83 |
index c991d04..f979877 100644
|
|
|
43fe83 |
--- a/src/qemu/qemu_process.c
|
|
|
43fe83 |
+++ b/src/qemu/qemu_process.c
|
|
|
43fe83 |
@@ -1818,10 +1818,10 @@ cleanup:
|
|
|
43fe83 |
}
|
|
|
43fe83 |
|
|
|
43fe83 |
len = strlen(buf);
|
|
|
43fe83 |
- /* best effor seek - we need to reset to the original position, so that
|
|
|
43fe83 |
+ /* best effort seek - we need to reset to the original position, so that
|
|
|
43fe83 |
* a possible read of the fd in the monitor code doesn't influence this
|
|
|
43fe83 |
* error delivery option */
|
|
|
43fe83 |
- lseek(logfd, pos, SEEK_SET);
|
|
|
43fe83 |
+ ignore_value(lseek(logfd, pos, SEEK_SET));
|
|
|
43fe83 |
qemuProcessReadLog(logfd, buf + len, buf_size - len - 1, 0, true);
|
|
|
43fe83 |
virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
|
43fe83 |
_("process exited while connecting to monitor: %s"),
|
|
|
43fe83 |
--
|
|
|
43fe83 |
1.8.4
|
|
|
43fe83 |
|