diff options
author | Krzysztof Wicher <mordotymoja@gmail.com> | 2018-11-05 10:48:53 -0800 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2018-11-05 15:34:39 -0800 |
commit | 0eb2dbbc3cd45b2a118aa44ac05bac9b8ca1eec4 (patch) | |
tree | e15957996f84bb0d07e73d2c5579e34fd6db8157 | |
parent | 139a9795911b059bd242ca6fbf7cd84bebe26a5b (diff) | |
download | coreclr-0eb2dbbc3cd45b2a118aa44ac05bac9b8ca1eec4.tar.gz coreclr-0eb2dbbc3cd45b2a118aa44ac05bac9b8ca1eec4.tar.bz2 coreclr-0eb2dbbc3cd45b2a118aa44ac05bac9b8ca1eec4.zip |
Improve/fix SerialStream.Dispose (dotnet/corefx#33221)
* Improve/fix SerialStream.Dispose
* Review feedback
* remove unused using statement
* Use ToFileDescriptor
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
-rw-r--r-- | src/System.Private.CoreLib/shared/Interop/Unix/System.Native/Interop.Read.cs | 2 | ||||
-rw-r--r-- | src/System.Private.CoreLib/shared/Interop/Unix/System.Native/Interop.Write.cs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/System.Private.CoreLib/shared/Interop/Unix/System.Native/Interop.Read.cs b/src/System.Private.CoreLib/shared/Interop/Unix/System.Native/Interop.Read.cs index 1be5e789c2..233feabdbb 100644 --- a/src/System.Private.CoreLib/shared/Interop/Unix/System.Native/Interop.Read.cs +++ b/src/System.Private.CoreLib/shared/Interop/Unix/System.Native/Interop.Read.cs @@ -20,6 +20,6 @@ internal static partial class Interop /// Note - on fail. the position of the stream may change depending on the platform; consult man 2 read for more info /// </returns> [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_Read", SetLastError = true)] - internal static extern unsafe int Read(SafeFileHandle fd, byte* buffer, int count); + internal static extern unsafe int Read(SafeHandle fd, byte* buffer, int count); } } diff --git a/src/System.Private.CoreLib/shared/Interop/Unix/System.Native/Interop.Write.cs b/src/System.Private.CoreLib/shared/Interop/Unix/System.Native/Interop.Write.cs index 0636615a8b..fb06d463be 100644 --- a/src/System.Private.CoreLib/shared/Interop/Unix/System.Native/Interop.Write.cs +++ b/src/System.Private.CoreLib/shared/Interop/Unix/System.Native/Interop.Write.cs @@ -19,7 +19,7 @@ internal static partial class Interop /// Returns the number of bytes written on success; otherwise, returns -1 and sets errno /// </returns> [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_Write", SetLastError = true)] - internal static extern unsafe int Write(SafeFileHandle fd, byte* buffer, int bufferSize); + internal static extern unsafe int Write(SafeHandle fd, byte* buffer, int bufferSize); [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_Write", SetLastError = true)] internal static extern unsafe int Write(int fd, byte* buffer, int bufferSize); |