aboutsummaryrefslogtreecommitdiff
path: root/chardev/char-pipe.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-01-04 21:37:01 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2017-06-02 11:33:52 +0400
commitef0f272f38e1e534dd05a5a611aa0eb15dc60cc1 (patch)
tree61380a925571d331e1781d5b04079f698478ea60 /chardev/char-pipe.c
parent221e659c3f37251b4312e0ac8ccf7799c67600b0 (diff)
char-win: rename hcom->file
hcom is the name of the file handle, regardless of the actual chardev driver (serial, file, console etc..). Rename it to be more explicit. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'chardev/char-pipe.c')
-rw-r--r--chardev/char-pipe.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/chardev/char-pipe.c b/chardev/char-pipe.c
index 54240c863d..aae950a22b 100644
--- a/chardev/char-pipe.c
+++ b/chardev/char-pipe.c
@@ -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) {