-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Address some System.Formats.Tar TODOs (infra and syscalls) #69107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 18 commits
c178925
9f020bd
c4d444b
354e40a
d04ec6b
9cb26f1
d94536a
cdbbddf
e343a3b
1af51df
d845d56
94d2cf0
90cc58c
fe9a927
a8f5cf6
498c084
7b4e7b5
a9090b4
7c01996
8de50ad
31ab76b
67fe812
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using System.Runtime.InteropServices; | ||
| using System.Buffers; | ||
| using System.Text; | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Reflection; | ||
|
|
||
| internal static partial class Interop | ||
| { | ||
| internal static partial class Sys | ||
| { | ||
| /// <summary> | ||
| /// Gets the group name associated to the specified group ID. | ||
| /// </summary> | ||
| /// <param name="gid">The group ID.</param> | ||
| /// <returns>On success, return a string with the group name. On failure, throws an IOException.</returns> | ||
| internal static string GetGName(uint gid) | ||
| { | ||
| string result = GetGNameInternal(gid); | ||
| return (result == null) ? throw GetIOException(GetLastErrorInfo()) : result; | ||
carlossanlop marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| /// <summary> | ||
| /// Gets the user name associated to the specified user ID. | ||
| /// </summary> | ||
| /// <param name="uid">The user ID.</param> | ||
| /// <returns>On success, return a string with the user name. On failure, throws an IOException.</returns> | ||
| internal static string GetUName(uint uid) | ||
| { | ||
| string result = GetUNameInternal(uid); | ||
| return (result == null) ? throw GetIOException(GetLastErrorInfo()) : result; | ||
| } | ||
|
|
||
| [LibraryImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetGName", StringMarshalling = StringMarshalling.Utf8, SetLastError = true)] | ||
| private static unsafe partial string GetGNameInternal(uint uid); | ||
|
||
|
|
||
| [LibraryImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetUName", StringMarshalling = StringMarshalling.Utf8, SetLastError = true)] | ||
| private static unsafe partial string GetUNameInternal(uint uid); | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.