Skip to contentSkip to conversation

Trivial patches for 2 to 16 November 2012

PATCH New Stefan Hajnoczi 1 participant 3 messages Nov 16, 2012

lore
Share & tools
lore
#0 lore raw

cover Trivial patches for 2 to 16 November 2012

The following changes since commit 6801038bc52d61f81ac8a25fbe392f1bad982887:

target-mips: fix wrong microMIPS opcode encoding (2012-11-15 14:48:16 +0100)

are available in the git repository at:

git://github.com/stefanha/qemu.git trivial-patches

for you to fetch changes up to 5719bd7c5a5ced7833c3fe5de5dc278abaf498dc:

sd: Send debug printfery to stderr not stdout (2012-11-16 14:53:19 +0100)

----------------------------------------------------------------
Anthony PERARD (1):
qemu-sockets: Fix parsing of the inet option 'to'.

Peter Crosthwaite (1):
sd: Send debug printfery to stderr not stdout

 hw/sd.c        | 4 ++--
 qemu-sockets.c | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)
Signature · 1 line
1.8.0
#1 lore raw

PATCH 1/2 qemu-sockets: Fix parsing of the inet option 'to'.

From: Anthony PERARD <[email protected]>

Having a qemu command line argument like "-vnc 127.0.0.1:0,to=99" is broken. This have been break with commit 879e45c72da1569e07fbbc6a1aa2a708ea796044.

---
 qemu-sockets.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
qemu-sockets.c +3 -2
index abcd791..03ca98d 100644
@@ -551,8 +551,9 @@ static InetSocketAddress *inet_parse(const char *str, Error **errp)
     optstr = str + pos;
     h = strstr(optstr, ",to=");
     if (h) {
-        if (1 != sscanf(str, "%d%n", &to, &pos) ||
-            (str[pos] != '\0' && str[pos] != ',')) {
+        h += 4;
+        if (sscanf(h, "%d%n", &to, &pos) != 1 ||
+            (h[pos] != '\0' && h[pos] != ',')) {
             error_setg(errp, "error parsing to= argument");
             goto fail;
         }
Signature · 1 line
1.8.0
#2 lore raw

PATCH 2/2 sd: Send debug printfery to stderr not stdout

In reply to Stefan Hajnoczi

From: Peter Crosthwaite <[email protected]>

Some debug printfs for SD are coming up in stdout. Redirected them to stderr instead.

---
 hw/sd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/sd.c +2 -2
index 3c34d43..607edba 100644
@@ -1439,8 +1439,8 @@ send_response:
         int i;
         DPRINTF("Response:");
         for (i = 0; i < rsplen; i++)
-            printf(" %02x", response[i]);
-        printf(" state %d\n", sd->state);
+            fprintf(stderr, " %02x", response[i]);
+        fprintf(stderr, " state %d\n", sd->state);
     } else {
         DPRINTF("No response %d\n", sd->state);
     }
Signature · 1 line
1.8.0