|
// <auto-generated/>
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ConvertErrorPlatformToPal", ExactSpelling = true)]
internal static extern partial global::Interop.Error ConvertErrorPlatformToPal(int platformErrno);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ConvertErrorPalToPlatform", ExactSpelling = true)]
internal static extern partial int ConvertErrorPalToPlatform(global::Interop.Error error);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_StrErrorR", ExactSpelling = true)]
private static unsafe extern partial byte* StrErrorR(int platformErrno, byte* buffer, int bufferSize);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
private static partial int MkNod(string pathName, uint mode, uint major, uint minor)
{
int __lastError;
byte* __pathName_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __pathName_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__pathName_native__marshaller.FromManaged(pathName, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__pathName_native = __pathName_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__pathName_native, mode, major, minor);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__pathName_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_MkNod", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __pathName_native, uint __mode_native, uint __major_native, uint __minor_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial void GetDeviceIdentifiers(ulong dev, uint* majorNumber, uint* minorNumber)
{
int __lastError;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__PInvoke(dev, majorNumber, minorNumber);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetDeviceIdentifiers", ExactSpelling = true)]
static extern unsafe void __PInvoke(ulong __dev_native, uint* __majorNumber_native, uint* __minorNumber_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetEUid", ExactSpelling = true)]
internal static extern partial uint GetEUid();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int GetPwUidR(uint uid, out global::Interop.Sys.Passwd pwd, byte* buf, int bufLen)
{
pwd = default;
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.Passwd* __pwd_native = &pwd)
{
__retVal = __PInvoke(uid, __pwd_native, buf, bufLen);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetPwUidR", ExactSpelling = true)]
static extern unsafe int __PInvoke(uint __uid_native, global::Interop.Sys.Passwd* __pwd_native, byte* __buf_native, int __bufLen_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int GetPwNamR(string name, out global::Interop.Sys.Passwd pwd, byte* buf, int bufLen)
{
pwd = default;
byte* __name_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __name_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__name_native__marshaller.FromManaged(name, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.Passwd* __pwd_native = &pwd)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__name_native = __name_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__name_native, __pwd_native, buf, bufLen);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__name_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetPwNamR", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __name_native, global::Interop.Sys.Passwd* __pwd_native, byte* __buf_native, int __bufLen_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
private static unsafe partial string GetGroupName(uint uid)
{
int __lastError;
bool __invokeSucceeded = default;
string __retVal = default;
byte* __retVal_native = default;
try
{
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal_native = __PInvoke(uid);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
__invokeSucceeded = true;
// Unmarshal - Convert native data to managed data.
__retVal = global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ConvertToManaged(__retVal_native);
}
finally
{
if (__invokeSucceeded)
{
// CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.Free(__retVal_native);
}
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetGroupName", ExactSpelling = true)]
static extern unsafe byte* __PInvoke(uint __uid_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int Link(string source, string link)
{
int __lastError;
byte* __source_native = default;
byte* __link_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __link_native__marshaller = new();
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __source_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__link_native__marshaller.FromManaged(link, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
__source_native__marshaller.FromManaged(source, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__link_native = __link_native__marshaller.ToUnmanaged();
__source_native = __source_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__source_native, __link_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__link_native__marshaller.Free();
__source_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Link", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __source_native, byte* __link_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int MkFifo(string pathName, uint mode)
{
int __lastError;
byte* __pathName_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __pathName_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__pathName_native__marshaller.FromManaged(pathName, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__pathName_native = __pathName_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__pathName_native, mode);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__pathName_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_MkFifo", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __pathName_native, uint __mode_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.Sys.FileStatus output)
{
int __lastError;
output = default;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.FileStatus* __output_native = &output)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, __output_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FStat", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, global::Interop.Sys.FileStatus* __output_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int Stat(string path, out global::Interop.Sys.FileStatus output)
{
int __lastError;
output = default;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.FileStatus* __output_native = &output)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native, __output_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Stat", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int LStat(string path, out global::Interop.Sys.FileStatus output)
{
int __lastError;
output = default;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.FileStatus* __output_native = &output)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native, __output_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LStat", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
}
}
}
|