Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 2b01345

Browse files
committed
Use new errno shim from managed code
1 parent 20b101d commit 2b01345

File tree

38 files changed

+323
-560
lines changed

38 files changed

+323
-560
lines changed

src/Common/src/Interop/FreeBSD/Interop.Errors.cs

Lines changed: 0 additions & 80 deletions
This file was deleted.

src/Common/src/Interop/Linux/Interop.Errors.cs

Lines changed: 0 additions & 113 deletions
This file was deleted.

src/Common/src/Interop/Linux/libc/Interop.inotify.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ internal static int inotify_rm_watch(int fd, int wd)
2222
int result = Interop.libc.inotify_rm_watch_extern(fd, wd);
2323
if (result < 0)
2424
{
25-
int hr = global::System.Runtime.InteropServices.Marshal.GetLastWin32Error();
26-
if (hr == Interop.Errors.EINVAL)
25+
Error hr = Interop.System.GetLastError();
26+
if (hr == Interop.Error.EINVAL)
2727
{
2828
// This specific case means that there was a deleted event in the queue that was not processed
2929
// so this call is expected to fail since the WatchDescriptor is no longer valid and was cleaned

src/Common/src/Interop/OSX/Interop.libproc.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ internal static unsafe string proc_pidpath(int pid)
441441
}
442442

443443
// OS X uses UTF-8. The conversion may not strip off all trailing \0s so remove them here
444-
return System.Text.Encoding.UTF8.GetString(pBuffer, result);
444+
return global::System.Text.Encoding.UTF8.GetString(pBuffer, result);
445445
}
446446

447447
/// <summary>

0 commit comments

Comments
 (0)