Flush serial port
Uwe Bonnes
bon at elektron.ikp.physik.tu-darmstadt.de
Wed May 25 19:57:13 CDT 2005
Changelog:
wine/server/file.c: create_file()
If we open a serial device, flush it
--
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Index: wine/server/file.c
===================================================================
RCS file: /home/wine/wine/server/file.c,v
retrieving revision 1.94
diff -u -r1.94 file.c
--- wine/server/file.c 24 Apr 2005 17:35:52 -0000 1.94
+++ wine/server/file.c 26 May 2005 00:55:29 -0000
@@ -42,6 +42,9 @@
#ifdef HAVE_POLL_H
#include <poll.h>
#endif
+#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#endif
#include "winerror.h"
#include "windef.h"
@@ -182,6 +185,7 @@
if (S_ISCHR(mode) && is_serial_fd( file->fd ))
{
struct object *obj = create_serial( file->fd, file->options );
+ tcflush(get_unix_fd(file->fd), TCIOFLUSH);
release_object( file );
return obj;
}
More information about the wine-patches
mailing list