summaryrefslogtreecommitdiffstats
path: root/chardev/char-pipe.c
diff options
context:
space:
mode:
authorPeter Maydell2017-06-05 11:09:14 +0200
committerPeter Maydell2017-06-05 11:09:14 +0200
commitcb8b8ef4578dc17c350fd4b27700a9f178e2dad0 (patch)
tree6bd382062ac77cc25bece492b78e15fec2a313e5 /chardev/char-pipe.c
parentMerge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (diff)
parentchar: move char devices to chardev/ (diff)
downloadqemu-cb8b8ef4578dc17c350fd4b27700a9f178e2dad0.tar.gz
qemu-cb8b8ef4578dc17c350fd4b27700a9f178e2dad0.tar.xz
qemu-cb8b8ef4578dc17c350fd4b27700a9f178e2dad0.zip
Merge remote-tracking branch 'remotes/elmarco/tags/chrfe-pull-request' into staging
# gpg: Signature made Fri 02 Jun 2017 20:12:48 BST # gpg: using RSA key 0xDAE8E10975969CE5 # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * remotes/elmarco/tags/chrfe-pull-request: char: move char devices to chardev/ char: make chr_fe_deinit() optionaly delete backend char: rename functions that are not part of fe char: move CharBackend handling in char-fe unit char: generalize qemu_chr_write_all() be-hci: use backend functions chardev: serial & parallel declaration to own headers chardev: move headers to include/chardev Remove/replace sysemu/char.h inclusion char-win: close file handle except with console char-win: rename hcom->file char-win: rename win_chr_init/poll win_chr_serial_init/poll char-win: remove WinChardev.len char-win: simplify win_chr_read() char: cast ARRAY_SIZE() as signed to silent warning on empty array Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'chardev/char-pipe.c')
-rw-r--r--chardev/char-pipe.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/chardev/char-pipe.c b/chardev/char-pipe.c
index 54240c863d..3a95e4c1b2 100644
--- a/chardev/char-pipe.c
+++ b/chardev/char-pipe.c
@@ -23,12 +23,12 @@
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
-#include "sysemu/char.h"
+#include "chardev/char.h"
#ifdef _WIN32
-#include "char-win.h"
+#include "chardev/char-win.h"
#else
-#include "char-fd.h"
+#include "chardev/char-fd.h"
#endif
#ifdef _WIN32
@@ -58,27 +58,27 @@ static int win_chr_pipe_init(Chardev *chr, const char *filename,
}
openname = g_strdup_printf("\\\\.\\pipe\\%s", filename);
- s->hcom = CreateNamedPipe(openname,
+ s->file = CreateNamedPipe(openname,
PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED,
PIPE_TYPE_BYTE | PIPE_READMODE_BYTE |
PIPE_WAIT,
MAXCONNECT, NSENDBUF, NRECVBUF, NTIMEOUT, NULL);
g_free(openname);
- if (s->hcom == INVALID_HANDLE_VALUE) {
+ if (s->file == INVALID_HANDLE_VALUE) {
error_setg(errp, "Failed CreateNamedPipe (%lu)", GetLastError());
- s->hcom = NULL;
+ s->file = NULL;
goto fail;
}
ZeroMemory(&ov, sizeof(ov));
ov.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
- ret = ConnectNamedPipe(s->hcom, &ov);
+ ret = ConnectNamedPipe(s->file, &ov);
if (ret) {
error_setg(errp, "Failed ConnectNamedPipe");
goto fail;
}
- ret = GetOverlappedResult(s->hcom, &ov, &size, TRUE);
+ ret = GetOverlappedResult(s->file, &ov, &size, TRUE);
if (!ret) {
error_setg(errp, "Failed GetOverlappedResult");
if (ov.hEvent) {