projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8cc1ea
)
This fixes Mono's Windows serial support for COM10+, while also not breaking compatib...
author
JamesB7
<jfb@zer7.com>
Tue, 24 Apr 2012 16:33:16 +0000
(13:33 -0300)
committer
JamesB7
<jfb@zer7.com>
Tue, 24 Apr 2012 16:33:16 +0000
(13:33 -0300)
mcs/class/System/System.IO.Ports/WinSerialStream.cs
patch
|
blob
|
history
diff --git
a/mcs/class/System/System.IO.Ports/WinSerialStream.cs
b/mcs/class/System/System.IO.Ports/WinSerialStream.cs
index e29aca4722fff3a6da236519f9eecc4219661e76..280082a706a7b008c4ae6a70faa379d082257a5e 100644
(file)
--- a/
mcs/class/System/System.IO.Ports/WinSerialStream.cs
+++ b/
mcs/class/System/System.IO.Ports/WinSerialStream.cs
@@
-78,7
+78,9
@@
namespace System.IO.Ports
bool dtr_enable, bool rts_enable, Handshake hs, int read_timeout, int write_timeout,
int read_buffer_size, int write_buffer_size)
{
- handle = CreateFile (port_name, GenericRead | GenericWrite, 0, 0, OpenExisting,
+ handle = CreateFile (port_name != null && !port_name.StartsWith(@"\\.\")
+ ? @"\\.\" + port_name : port_name,
+ GenericRead | GenericWrite, 0, 0, OpenExisting,
FileFlagOverlapped, 0);
if (handle == -1)