Skip to contentSkip to conversation

qemu-char: fix the commit "qemu-char: Print strerror message on failure"

PATCH In review TeLeMan 1 participant 2 messages Jul 25, 2011

lore
Share & tools
lore

TeLeMan

author
#0 lore raw

PATCH 1/1 qemu-char: fix the commit "qemu-char: Print strerror message on failure"

The commit 6e1db57b2ac9025c2443c665a0d9e78748637b26 missed patching qemu_chr_open_win_file().

---
 qemu-char.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
qemu-char.c +5 -3
index dcf7065..ea7abfe 100644
@@ -1782,7 +1782,7 @@ static int qemu_chr_open_win_pipe(QemuOpts *opts, CharDriverState **_chr)
     return 0;
 }
 
-static CharDriverState *qemu_chr_open_win_file(HANDLE fd_out)
+static int qemu_chr_open_win_file(HANDLE fd_out, CharDriverState **_chr)
 {
     CharDriverState *chr;
     WinCharState *s;
@@ -1793,12 +1793,14 @@ static CharDriverState *qemu_chr_open_win_file(HANDLE fd_out)
     chr->opaque = s;
     chr->chr_write = win_chr_write;
     qemu_chr_generic_open(chr);
-    return chr;
+
+    *_chr = chr;
+    return 0;
 }
 
 static int qemu_chr_open_win_con(QemuOpts *opts, CharDriverState **_chr)
 {
-    return qemu_chr_open_win_file(GetStdHandle(STD_OUTPUT_HANDLE), chr);
+    return qemu_chr_open_win_file(GetStdHandle(STD_OUTPUT_HANDLE), _chr);
 }
 
 static int qemu_chr_open_win_file_out(QemuOpts *opts, CharDriverState **_chr)
Signature · 1 line
1.7.3.1.msysgit.0
author
#1 lore raw

Oh, Blue Swirl did it, please ignore this.
--
SUN OF A BEACH

Quoted 41 lines · TeLeMan

The commit 6e1db57b2ac9025c2443c665a0d9e78748637b26 missed patching qemu_chr_open_win_file().

---
 qemu-char.c |    8 +++++---

 1 files changed, 5 insertions(+), 3 deletions(-)
qemu-char.c +5 -4
index dcf7065..ea7abfe 100644
@@ -1782,7 +1782,7 @@ static int qemu_chr_open_win_pipe(QemuOpts *opts, CharDriverState **_chr)
     return 0;
  }
 
-static CharDriverState *qemu_chr_open_win_file(HANDLE fd_out)
+static int qemu_chr_open_win_file(HANDLE fd_out, CharDriverState **_chr)
  {
     CharDriverState *chr;
     WinCharState *s;
@@ -1793,12 +1793,14 @@ static CharDriverState *qemu_chr_open_win_file(HANDLE fd_out)
     chr->opaque = s;
     chr->chr_write = win_chr_write;
     qemu_chr_generic_open(chr);
-    return chr;
+
+    *_chr = chr;
+    return 0;
  }
 
  static int qemu_chr_open_win_con(QemuOpts *opts, CharDriverState **_chr)
  {
-    return qemu_chr_open_win_file(GetStdHandle(STD_OUTPUT_HANDLE), chr);
+    return qemu_chr_open_win_file(GetStdHandle(STD_OUTPUT_HANDLE), _chr);
  }
 
  static int qemu_chr_open_win_file_out(QemuOpts *opts, CharDriverState **_chr)
--

1.7.3.1.msysgit.0