Patrick Rudolph (siro(a)das-labor.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14510
-gerrit
commit 9f9e54237af11e1f96c9737200f1627508fbf170
Author: Patrick Rudolph <siro(a)das-labor.org>
Date: Mon Apr 25 12:24:03 2016 +0200
qemu-0.15.x/serialice-com: Fix parsing of version string
Check buffer contents after writing to it.
Fixes version string wasn't parsed at all, as it starts
with \r\n.
Change-Id: Ia012434b3806f936971c8f9e99ed198f85171111
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
qemu-0.15.x/serialice-com.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/qemu-0.15.x/serialice-com.c b/qemu-0.15.x/serialice-com.c
index 54f293b..cb3794c 100644
--- a/qemu-0.15.x/serialice-com.c
+++ b/qemu-0.15.x/serialice-com.c
@@ -346,9 +346,9 @@ static void msg_version(void)
memset(s->buffer, 0, BUFFER_SIZE);
serialice_read(s, s->buffer, 1);
serialice_read(s, s->buffer, 1);
- while (s->buffer[len++] != '\n') {
+ do {
serialice_read(s, s->buffer + len, 1);
- }
+ } while (s->buffer[len++] != '\n');
s->buffer[len - 1] = '\0';
printf("%s\n", s->buffer);
Patrick Rudolph (siro(a)das-labor.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14507
-gerrit
commit 45e35a142945325d309f71074a5a1d747c419d57
Author: Patrick Rudolph <siro(a)das-labor.org>
Date: Mon Apr 25 12:17:55 2016 +0200
qemu-0.15.x/serialice: Fix compilation warnings
Include the required header to fix compiler warnings.
Change-Id: I39085719ca81fb4592138fc254ada6caaecb2fc7
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
qemu-0.15.x/serialice.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/qemu-0.15.x/serialice.c b/qemu-0.15.x/serialice.c
index 398f378..793951f 100644
--- a/qemu-0.15.x/serialice.c
+++ b/qemu-0.15.x/serialice.c
@@ -35,6 +35,7 @@
/* Local includes */
#include "hw/hw.h"
+#include "cpu.h"
#include "hw/loader.h"
#include "hw/pc.h"
#include "hw/boards.h"
Patrick Rudolph (siro(a)das-labor.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14508
-gerrit
commit 8dfcb598b22f89115624c679f5b4522699db5101
Author: Patrick Rudolph <siro(a)das-labor.org>
Date: Mon Apr 25 12:19:39 2016 +0200
qemu-0.15.x/serialice-com: Return errors in read function
On error return -1 to calling function.
Allows calling function to handle errors.
Change-Id: I168093eaad897f2998c055e46acd88fe6a263947
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
qemu-0.15.x/serialice-com.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qemu-0.15.x/serialice-com.c b/qemu-0.15.x/serialice-com.c
index ee539f4..470c76a 100644
--- a/qemu-0.15.x/serialice-com.c
+++ b/qemu-0.15.x/serialice-com.c
@@ -91,7 +91,7 @@ static int serialice_read(SerialICEState * state, void *buf, size_t nbyte)
}
if (ret == -1) {
- break;
+ return -1;
}
#endif