Rename enum fields

This commit is contained in:
Alex Barney 2018-12-01 11:15:17 -06:00
parent 9b22e8af5e
commit 8faae5612d
5 changed files with 403 additions and 403 deletions

View file

@ -253,7 +253,7 @@ namespace Ryujinx.HLE.HOS.Kernel
ElfDynamicTag Tag = (ElfDynamicTag)TagVal;
if (Tag == ElfDynamicTag.DT_NULL)
if (Tag == ElfDynamicTag.Null)
{
break;
}
@ -261,9 +261,9 @@ namespace Ryujinx.HLE.HOS.Kernel
Dynamic[Tag] = Value;
}
if (!Dynamic.TryGetValue(ElfDynamicTag.DT_STRTAB, out long StrTab) ||
!Dynamic.TryGetValue(ElfDynamicTag.DT_SYMTAB, out long SymTab) ||
!Dynamic.TryGetValue(ElfDynamicTag.DT_SYMENT, out long SymEntSize))
if (!Dynamic.TryGetValue(ElfDynamicTag.StrTab, out long StrTab) ||
!Dynamic.TryGetValue(ElfDynamicTag.SymTab, out long SymTab) ||
!Dynamic.TryGetValue(ElfDynamicTag.SymEnt, out long SymEntSize))
{
return;
}

View file

@ -11,93 +11,93 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
class IClient : IpcService
{
private static Dictionary<WSAError, LinuxError> ErrorMap = new Dictionary<WSAError, LinuxError>
private static Dictionary<WsaError, LinuxError> ErrorMap = new Dictionary<WsaError, LinuxError>
{
// WSAEINTR
{WSAError.WSAEINTR, LinuxError.EINTR},
{WsaError.Interrupted, LinuxError.Intr},
// WSAEWOULDBLOCK
{WSAError.WSAEWOULDBLOCK, LinuxError.EWOULDBLOCK},
{WsaError.WouldBlock, LinuxError.WouldBlock},
// WSAEINPROGRESS
{WSAError.WSAEINPROGRESS, LinuxError.EINPROGRESS},
{WsaError.InProgress, LinuxError.InProgress},
// WSAEALREADY
{WSAError.WSAEALREADY, LinuxError.EALREADY},
{WsaError.AlreadyInProgress, LinuxError.Already},
// WSAENOTSOCK
{WSAError.WSAENOTSOCK, LinuxError.ENOTSOCK},
{WsaError.NotSocket, LinuxError.NotSock},
// WSAEDESTADDRREQ
{WSAError.WSAEDESTADDRREQ, LinuxError.EDESTADDRREQ},
{WsaError.DestinationAddressRequired, LinuxError.DestAddrReq},
// WSAEMSGSIZE
{WSAError.WSAEMSGSIZE, LinuxError.EMSGSIZE},
{WsaError.MessageSize, LinuxError.MsgSize},
// WSAEPROTOTYPE
{WSAError.WSAEPROTOTYPE, LinuxError.EPROTOTYPE},
{WsaError.ProtocolType, LinuxError.ProtoType},
// WSAENOPROTOOPT
{WSAError.WSAENOPROTOOPT, LinuxError.ENOPROTOOPT},
{WsaError.ProtocolOption, LinuxError.NoProtoOpt},
// WSAEPROTONOSUPPORT
{WSAError.WSAEPROTONOSUPPORT, LinuxError.EPROTONOSUPPORT},
{WsaError.ProtocolNotSupported, LinuxError.ProtoNoSupport},
// WSAESOCKTNOSUPPORT
{WSAError.WSAESOCKTNOSUPPORT, LinuxError.ESOCKTNOSUPPORT},
{WsaError.SocketNotSupported, LinuxError.SocktNoSupport},
// WSAEOPNOTSUPP
{WSAError.WSAEOPNOTSUPP, LinuxError.EOPNOTSUPP},
{WsaError.OperationNotSupported, LinuxError.OpNotSupp},
// WSAEPFNOSUPPORT
{WSAError.WSAEPFNOSUPPORT, LinuxError.EPFNOSUPPORT},
{WsaError.ProtocolFamilyNotSupported, LinuxError.PfNoSupport},
// WSAEAFNOSUPPORT
{WSAError.WSAEAFNOSUPPORT, LinuxError.EAFNOSUPPORT},
{WsaError.AddressFamilyNotSupported, LinuxError.AfNoSupport},
// WSAEADDRINUSE
{WSAError.WSAEADDRINUSE, LinuxError.EADDRINUSE},
{WsaError.AddressAlreadyInUse, LinuxError.AddrInUse},
// WSAEADDRNOTAVAIL
{WSAError.WSAEADDRNOTAVAIL, LinuxError.EADDRNOTAVAIL},
{WsaError.AddressNotAvailable, LinuxError.AddrNotAvail},
// WSAENETDOWN
{WSAError.WSAENETDOWN, LinuxError.ENETDOWN},
{WsaError.NetworkDown, LinuxError.NetDown},
// WSAENETUNREACH
{WSAError.WSAENETUNREACH, LinuxError.ENETUNREACH},
{WsaError.NetworkUnreachable, LinuxError.NetUnReach},
// WSAENETRESET
{WSAError.WSAENETRESET, LinuxError.ENETRESET},
{WsaError.NetworkReset, LinuxError.NetReset},
// WSAECONNABORTED
{WSAError.WSAECONNABORTED, LinuxError.ECONNABORTED},
{WsaError.ConnectionAborted, LinuxError.ConnAborted},
// WSAECONNRESET
{WSAError.WSAECONNRESET, LinuxError.ECONNRESET},
{WsaError.ConnectionReset, LinuxError.ConnReset},
// WSAENOBUFS
{WSAError.WSAENOBUFS, LinuxError.ENOBUFS},
{WsaError.NoBufferSpaceAvailable, LinuxError.NoBufs},
// WSAEISCONN
{WSAError.WSAEISCONN, LinuxError.EISCONN},
{WsaError.IsConnected, LinuxError.IsConn},
// WSAENOTCONN
{WSAError.WSAENOTCONN, LinuxError.ENOTCONN},
{WsaError.NotConnected, LinuxError.NotConn},
// WSAESHUTDOWN
{WSAError.WSAESHUTDOWN, LinuxError.ESHUTDOWN},
{WsaError.Shutdown, LinuxError.Shutdown},
// WSAETOOMANYREFS
{WSAError.WSAETOOMANYREFS, LinuxError.ETOOMANYREFS},
{WsaError.TooManyReferences, LinuxError.TooManyRefs},
// WSAETIMEDOUT
{WSAError.WSAETIMEDOUT, LinuxError.ETIMEDOUT},
{WsaError.TimedOut, LinuxError.TimedOut},
// WSAECONNREFUSED
{WSAError.WSAECONNREFUSED, LinuxError.ECONNREFUSED},
{WsaError.ConnectionRefused, LinuxError.ConnRefused},
// WSAELOOP
{WSAError.WSAELOOP, LinuxError.ELOOP},
{WsaError.Loop, LinuxError.Loop},
// WSAENAMETOOLONG
{WSAError.WSAENAMETOOLONG, LinuxError.ENAMETOOLONG},
{WsaError.NameTooLong, LinuxError.NameTooLong},
// WSAEHOSTDOWN
{WSAError.WSAEHOSTDOWN, LinuxError.EHOSTDOWN},
{WsaError.HostDown, LinuxError.HostDown},
// WSAEHOSTUNREACH
{WSAError.WSAEHOSTUNREACH, LinuxError.EHOSTUNREACH},
{WsaError.HostUnreachable, LinuxError.HostUnReach},
// WSAENOTEMPTY
{WSAError.WSAENOTEMPTY, LinuxError.ENOTEMPTY},
{WsaError.NotEmpty, LinuxError.NotEmpty},
// WSAEUSERS
{WSAError.WSAEUSERS, LinuxError.EUSERS},
{WsaError.UserQuota, LinuxError.Users},
// WSAEDQUOT
{WSAError.WSAEDQUOT, LinuxError.EDQUOT},
{WsaError.DiskQuota, LinuxError.DQuot},
// WSAESTALE
{WSAError.WSAESTALE, LinuxError.ESTALE},
{WsaError.Stale, LinuxError.Stale},
// WSAEREMOTE
{WSAError.WSAEREMOTE, LinuxError.EREMOTE},
{WsaError.Remote, LinuxError.Remote},
// WSAEINVAL
{WSAError.WSAEINVAL, LinuxError.EINVAL},
{WsaError.InvalidArgument, LinuxError.InVal},
// WSAEFAULT
{WSAError.WSAEFAULT, LinuxError.EFAULT},
{WsaError.Fault, LinuxError.Fault},
// NOERROR
{0, 0}
};
private Dictionary<int, ServiceProcessRequest> m_Commands;
private Dictionary<int, ServiceProcessRequest> _commands;
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
private bool IsPrivileged;
@ -105,7 +105,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
public IClient(bool IsPrivileged)
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
_commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 0, RegisterClient },
{ 1, StartMonitoring },
@ -140,7 +140,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
this.IsPrivileged = IsPrivileged;
}
private LinuxError ConvertError(WSAError ErrorCode)
private LinuxError ConvertError(WsaError ErrorCode)
{
LinuxError Errno;
@ -152,14 +152,14 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
return Errno;
}
private long WriteWinSock2Error(ServiceCtx Context, WSAError ErrorCode)
private long WriteWinSock2Error(ServiceCtx Context, WsaError ErrorCode)
{
return WriteBsdResult(Context, -1, ConvertError(ErrorCode));
}
private long WriteBsdResult(ServiceCtx Context, int Result, LinuxError ErrorCode = 0)
{
if (ErrorCode != LinuxError.SUCCESS)
if (ErrorCode != LinuxError.Success)
{
Result = -1;
}
@ -182,7 +182,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
private LinuxError SetResultErrno(Socket Socket, int Result)
{
return Result == 0 && !Socket.Blocking ? LinuxError.EWOULDBLOCK : LinuxError.SUCCESS;
return Result == 0 && !Socket.Blocking ? LinuxError.WouldBlock : LinuxError.Success;
}
private AddressFamily ConvertFromBsd(int Domain)
@ -204,13 +204,13 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
if (Domain == AddressFamily.Unknown)
{
return WriteBsdResult(Context, -1, LinuxError.EPROTONOSUPPORT);
return WriteBsdResult(Context, -1, LinuxError.ProtoNoSupport);
}
else if ((Type == SocketType.Seqpacket || Type == SocketType.Raw) && !IsPrivileged)
{
if (Domain != AddressFamily.InterNetwork || Type != SocketType.Raw || Protocol != ProtocolType.Icmp)
{
return WriteBsdResult(Context, -1, LinuxError.ENOENT);
return WriteBsdResult(Context, -1, LinuxError.NoEnt);
}
}
@ -314,7 +314,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
byte[] RawPath = Context.Memory.ReadBytes(BufferPosition, BufferSize);
string Path = Encoding.ASCII.GetString(RawPath);
WriteBsdResult(Context, -1, LinuxError.EOPNOTSUPP);
WriteBsdResult(Context, -1, LinuxError.OpNotSupp);
Logger.PrintStub(LogClass.ServiceBsd, $"Stubbed. Path: {Path} - " +
$"Flags: {Flags}");
@ -325,7 +325,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
// Select(u32 nfds, nn::socket::timeout timeout, buffer<nn::socket::fd_set, 0x21, 0> readfds_in, buffer<nn::socket::fd_set, 0x21, 0> writefds_in, buffer<nn::socket::fd_set, 0x21, 0> errorfds_in) -> (i32 ret, u32 bsd_errno, buffer<nn::socket::fd_set, 0x22, 0> readfds_out, buffer<nn::socket::fd_set, 0x22, 0> writefds_out, buffer<nn::socket::fd_set, 0x22, 0> errorfds_out)
public long Select(ServiceCtx Context)
{
WriteBsdResult(Context, -1, LinuxError.EOPNOTSUPP);
WriteBsdResult(Context, -1, LinuxError.OpNotSupp);
Logger.PrintStub(LogClass.ServiceBsd, $"Stubbed.");
@ -343,7 +343,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
if (Timeout < -1 || FdsCount < 0 || (FdsCount * 8) > BufferSize)
{
return WriteBsdResult(Context, -1, LinuxError.EINVAL);
return WriteBsdResult(Context, -1, LinuxError.InVal);
}
PollEvent[] Events = new PollEvent[FdsCount];
@ -356,7 +356,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
if (Socket == null)
{
return WriteBsdResult(Context, -1, LinuxError.EBADF);
return WriteBsdResult(Context, -1, LinuxError.BadF);
}
PollEvent.EventTypeMask InputEvents = (PollEvent.EventTypeMask)Context.Memory.ReadInt16(BufferPosition + i * 8 + 4);
@ -406,7 +406,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
if (!IsValidEvent)
{
Logger.PrintWarning(LogClass.ServiceBsd, $"Unsupported Poll input event type: {Event.InputEvents}");
return WriteBsdResult(Context, -1, LinuxError.EINVAL);
return WriteBsdResult(Context, -1, LinuxError.InVal);
}
}
@ -416,7 +416,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
}
catch (SocketException Exception)
{
return WriteWinSock2Error(Context, (WSAError)Exception.ErrorCode);
return WriteWinSock2Error(Context, (WsaError)Exception.ErrorCode);
}
for (int i = 0; i < FdsCount; i++)
@ -455,13 +455,13 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
Context.Memory.WriteInt16(BufferPosition + i * 8 + 6, (short)OutputEvents);
}
return WriteBsdResult(Context, ReadEvents.Count + WriteEvents.Count + ErrorEvents.Count, LinuxError.SUCCESS);
return WriteBsdResult(Context, ReadEvents.Count + WriteEvents.Count + ErrorEvents.Count, LinuxError.Success);
}
// Sysctl(buffer<unknown, 0x21, 0>, buffer<unknown, 0x21, 0>) -> (i32 ret, u32 bsd_errno, u32, buffer<unknown, 0x22, 0>)
public long Sysctl(ServiceCtx Context)
{
WriteBsdResult(Context, -1, LinuxError.EOPNOTSUPP);
WriteBsdResult(Context, -1, LinuxError.OpNotSupp);
Logger.PrintStub(LogClass.ServiceBsd, $"Stubbed.");
@ -476,7 +476,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
(long ReceivePosition, long ReceiveLength) = Context.Request.GetBufferType0x22();
LinuxError Errno = LinuxError.EBADF;
LinuxError Errno = LinuxError.BadF;
BsdSocket Socket = RetrieveSocket(SocketFd);
int Result = -1;
@ -486,7 +486,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
&& (SocketFlags & SocketFlags.Peek) == 0)
{
Logger.PrintWarning(LogClass.ServiceBsd, $"Unsupported Recv flags: {SocketFlags}");
return WriteBsdResult(Context, -1, LinuxError.EOPNOTSUPP);
return WriteBsdResult(Context, -1, LinuxError.OpNotSupp);
}
byte[] ReceivedBuffer = new byte[ReceiveLength];
@ -500,7 +500,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
}
catch (SocketException Exception)
{
Errno = ConvertError((WSAError)Exception.ErrorCode);
Errno = ConvertError((WsaError)Exception.ErrorCode);
}
}
@ -517,7 +517,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
(long SockAddrInPosition, long SockAddrInSize) = Context.Request.GetBufferType0x21();
(long SockAddrOutPosition, long SockAddrOutSize) = Context.Request.GetBufferType0x22(1);
LinuxError Errno = LinuxError.EBADF;
LinuxError Errno = LinuxError.BadF;
BsdSocket Socket = RetrieveSocket(SocketFd);
int Result = -1;
@ -528,7 +528,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
{
Logger.PrintWarning(LogClass.ServiceBsd, $"Unsupported Recv flags: {SocketFlags}");
return WriteBsdResult(Context, -1, LinuxError.EOPNOTSUPP);
return WriteBsdResult(Context, -1, LinuxError.OpNotSupp);
}
byte[] ReceivedBuffer = new byte[ReceiveLength];
@ -544,7 +544,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
}
catch (SocketException Exception)
{
Errno = ConvertError((WSAError)Exception.ErrorCode);
Errno = ConvertError((WsaError)Exception.ErrorCode);
}
}
@ -559,7 +559,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
(long SendPosition, long SendSize) = Context.Request.GetBufferType0x21();
LinuxError Errno = LinuxError.EBADF;
LinuxError Errno = LinuxError.BadF;
BsdSocket Socket = RetrieveSocket(SocketFd);
int Result = -1;
@ -570,7 +570,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
{
Logger.PrintWarning(LogClass.ServiceBsd, $"Unsupported Send flags: {SocketFlags}");
return WriteBsdResult(Context, -1, LinuxError.EOPNOTSUPP);
return WriteBsdResult(Context, -1, LinuxError.OpNotSupp);
}
byte[] SendBuffer = Context.Memory.ReadBytes(SendPosition, SendSize);
@ -582,7 +582,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
}
catch (SocketException Exception)
{
Errno = ConvertError((WSAError)Exception.ErrorCode);
Errno = ConvertError((WsaError)Exception.ErrorCode);
}
}
@ -599,7 +599,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
(long SendPosition, long SendSize) = Context.Request.GetBufferType0x21();
(long BufferPosition, long BufferSize) = Context.Request.GetBufferType0x21(1);
LinuxError Errno = LinuxError.EBADF;
LinuxError Errno = LinuxError.BadF;
BsdSocket Socket = RetrieveSocket(SocketFd);
int Result = -1;
@ -610,7 +610,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
{
Logger.PrintWarning(LogClass.ServiceBsd, $"Unsupported Send flags: {SocketFlags}");
return WriteBsdResult(Context, -1, LinuxError.EOPNOTSUPP);
return WriteBsdResult(Context, -1, LinuxError.OpNotSupp);
}
byte[] SendBuffer = Context.Memory.ReadBytes(SendPosition, SendSize);
@ -623,7 +623,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
}
catch (SocketException Exception)
{
Errno = ConvertError((WSAError)Exception.ErrorCode);
Errno = ConvertError((WsaError)Exception.ErrorCode);
}
}
@ -638,12 +638,12 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
(long BufferPos, long BufferSize) = Context.Request.GetBufferType0x22();
LinuxError Errno = LinuxError.EBADF;
LinuxError Errno = LinuxError.BadF;
BsdSocket Socket = RetrieveSocket(SocketFd);
if (Socket != null)
{
Errno = LinuxError.SUCCESS;
Errno = LinuxError.Success;
Socket NewSocket = null;
@ -653,14 +653,14 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
}
catch (SocketException Exception)
{
Errno = ConvertError((WSAError)Exception.ErrorCode);
Errno = ConvertError((WsaError)Exception.ErrorCode);
}
if (NewSocket == null && Errno == LinuxError.SUCCESS)
if (NewSocket == null && Errno == LinuxError.Success)
{
Errno = LinuxError.EWOULDBLOCK;
Errno = LinuxError.WouldBlock;
}
else if (Errno == LinuxError.SUCCESS)
else if (Errno == LinuxError.Success)
{
BsdSocket NewBsdSocket = new BsdSocket
{
@ -692,12 +692,12 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
(long BufferPos, long BufferSize) = Context.Request.GetBufferType0x21();
LinuxError Errno = LinuxError.EBADF;
LinuxError Errno = LinuxError.BadF;
BsdSocket Socket = RetrieveSocket(SocketFd);
if (Socket != null)
{
Errno = LinuxError.SUCCESS;
Errno = LinuxError.Success;
try
{
@ -707,7 +707,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
}
catch (SocketException Exception)
{
Errno = ConvertError((WSAError)Exception.ErrorCode);
Errno = ConvertError((WsaError)Exception.ErrorCode);
}
}
@ -721,12 +721,12 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
(long BufferPos, long BufferSize) = Context.Request.GetBufferType0x21();
LinuxError Errno = LinuxError.EBADF;
LinuxError Errno = LinuxError.BadF;
BsdSocket Socket = RetrieveSocket(SocketFd);
if (Socket != null)
{
Errno = LinuxError.SUCCESS;
Errno = LinuxError.Success;
try
{
IPEndPoint EndPoint = ParseSockAddr(Context, BufferPos, BufferSize);
@ -735,7 +735,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
}
catch (SocketException Exception)
{
Errno = ConvertError((WSAError)Exception.ErrorCode);
Errno = ConvertError((WsaError)Exception.ErrorCode);
}
}
@ -749,12 +749,12 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
(long BufferPos, long BufferSize) = Context.Request.GetBufferType0x22();
LinuxError Errno = LinuxError.EBADF;
LinuxError Errno = LinuxError.BadF;
BsdSocket Socket = RetrieveSocket(SocketFd);
if (Socket != null)
{
Errno = LinuxError.SUCCESS;
Errno = LinuxError.Success;
WriteSockAddr(Context, BufferPos, Socket, true);
WriteBsdResult(Context, 0, Errno);
@ -771,12 +771,12 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
(long BufferPos, long BufferSize) = Context.Request.GetBufferType0x22();
LinuxError Errno = LinuxError.EBADF;
LinuxError Errno = LinuxError.BadF;
BsdSocket Socket = RetrieveSocket(SocketFd);
if (Socket != null)
{
Errno = LinuxError.SUCCESS;
Errno = LinuxError.Success;
WriteSockAddr(Context, BufferPos, Socket, false);
WriteBsdResult(Context, 0, Errno);
@ -795,12 +795,12 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
(long BufferPosition, long BufferSize) = Context.Request.GetBufferType0x22();
LinuxError Errno = LinuxError.EBADF;
LinuxError Errno = LinuxError.BadF;
BsdSocket Socket = RetrieveSocket(SocketFd);
if (Socket != null)
{
Errno = LinuxError.ENOPROTOOPT;
Errno = LinuxError.NoProtoOpt;
if (Level == 0xFFFF)
{
@ -821,12 +821,12 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
int SocketFd = Context.RequestData.ReadInt32();
int Backlog = Context.RequestData.ReadInt32();
LinuxError Errno = LinuxError.EBADF;
LinuxError Errno = LinuxError.BadF;
BsdSocket Socket = RetrieveSocket(SocketFd);
if (Socket != null)
{
Errno = LinuxError.SUCCESS;
Errno = LinuxError.Success;
try
{
@ -834,7 +834,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
}
catch (SocketException Exception)
{
Errno = ConvertError((WSAError)Exception.ErrorCode);
Errno = ConvertError((WsaError)Exception.ErrorCode);
}
}
@ -848,7 +848,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
BsdIoctl Cmd = (BsdIoctl)Context.RequestData.ReadInt32();
int BufferCount = Context.RequestData.ReadInt32();
LinuxError Errno = LinuxError.EBADF;
LinuxError Errno = LinuxError.BadF;
BsdSocket Socket = RetrieveSocket(SocketFd);
if (Socket != null)
@ -856,7 +856,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
switch (Cmd)
{
case BsdIoctl.AtMark:
Errno = LinuxError.SUCCESS;
Errno = LinuxError.Success;
(long BufferPosition, long BufferSize) = Context.Request.GetBufferType0x22();
@ -865,7 +865,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
break;
default:
Errno = LinuxError.EOPNOTSUPP;
Errno = LinuxError.OpNotSupp;
Logger.PrintWarning(LogClass.ServiceBsd, $"Unsupported Ioctl Cmd: {Cmd}");
break;
@ -883,12 +883,12 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
int Arg = Context.RequestData.ReadInt32();
int Result = 0;
LinuxError Errno = LinuxError.EBADF;
LinuxError Errno = LinuxError.BadF;
BsdSocket Socket = RetrieveSocket(SocketFd);
if (Socket != null)
{
Errno = LinuxError.SUCCESS;
Errno = LinuxError.Success;
if (Cmd == 0x3)
{
@ -901,7 +901,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
}
else
{
Errno = LinuxError.EOPNOTSUPP;
Errno = LinuxError.OpNotSupp;
}
}
@ -931,23 +931,23 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
Socket.Handle.GetSocketOption(SocketOptionLevel.Socket, OptionName, OptionValue);
Context.Memory.WriteBytes(OptionValuePosition, OptionValue);
return LinuxError.SUCCESS;
return LinuxError.Success;
case (SocketOptionName)0x200:
Socket.Handle.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, OptionValue);
Context.Memory.WriteBytes(OptionValuePosition, OptionValue);
return LinuxError.SUCCESS;
return LinuxError.Success;
default:
Logger.PrintWarning(LogClass.ServiceBsd, $"Unsupported SetSockOpt OptionName: {OptionName}");
return LinuxError.EOPNOTSUPP;
return LinuxError.OpNotSupp;
}
}
catch (SocketException Exception)
{
return ConvertError((WSAError)Exception.ErrorCode);
return ConvertError((WsaError)Exception.ErrorCode);
}
}
@ -971,28 +971,28 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
case SocketOptionName.ReuseAddress:
Socket.Handle.SetSocketOption(SocketOptionLevel.Socket, OptionName, Context.Memory.ReadInt32(OptionValuePosition));
return LinuxError.SUCCESS;
return LinuxError.Success;
case (SocketOptionName)0x200:
Socket.Handle.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, Context.Memory.ReadInt32(OptionValuePosition));
return LinuxError.SUCCESS;
return LinuxError.Success;
case SocketOptionName.Linger:
Socket.Handle.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Linger,
new LingerOption(Context.Memory.ReadInt32(OptionValuePosition) != 0, Context.Memory.ReadInt32(OptionValuePosition + 4)));
return LinuxError.SUCCESS;
return LinuxError.Success;
default:
Logger.PrintWarning(LogClass.ServiceBsd, $"Unsupported SetSockOpt OptionName: {OptionName}");
return LinuxError.EOPNOTSUPP;
return LinuxError.OpNotSupp;
}
}
catch (SocketException Exception)
{
return ConvertError((WSAError)Exception.ErrorCode);
return ConvertError((WsaError)Exception.ErrorCode);
}
}
@ -1005,12 +1005,12 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
(long BufferPos, long BufferSize) = Context.Request.GetBufferType0x21();
LinuxError Errno = LinuxError.EBADF;
LinuxError Errno = LinuxError.BadF;
BsdSocket Socket = RetrieveSocket(SocketFd);
if (Socket != null)
{
Errno = LinuxError.ENOPROTOOPT;
Errno = LinuxError.NoProtoOpt;
if (Level == 0xFFFF)
{
@ -1031,16 +1031,16 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
int SocketFd = Context.RequestData.ReadInt32();
int How = Context.RequestData.ReadInt32();
LinuxError Errno = LinuxError.EBADF;
LinuxError Errno = LinuxError.BadF;
BsdSocket Socket = RetrieveSocket(SocketFd);
if (Socket != null)
{
Errno = LinuxError.EINVAL;
Errno = LinuxError.InVal;
if (How >= 0 && How <= 2)
{
Errno = LinuxError.SUCCESS;
Errno = LinuxError.Success;
try
{
@ -1048,7 +1048,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
}
catch (SocketException Exception)
{
Errno = ConvertError((WSAError)Exception.ErrorCode);
Errno = ConvertError((WsaError)Exception.ErrorCode);
}
}
}
@ -1061,11 +1061,11 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
{
int How = Context.RequestData.ReadInt32();
LinuxError Errno = LinuxError.EINVAL;
LinuxError Errno = LinuxError.InVal;
if (How >= 0 && How <= 2)
{
Errno = LinuxError.SUCCESS;
Errno = LinuxError.Success;
foreach (BsdSocket Socket in Sockets)
{
@ -1077,7 +1077,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
}
catch (SocketException Exception)
{
Errno = ConvertError((WSAError)Exception.ErrorCode);
Errno = ConvertError((WsaError)Exception.ErrorCode);
break;
}
}
@ -1094,7 +1094,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
(long SendPosition, long SendSize) = Context.Request.GetBufferType0x21();
LinuxError Errno = LinuxError.EBADF;
LinuxError Errno = LinuxError.BadF;
BsdSocket Socket = RetrieveSocket(SocketFd);
int Result = -1;
@ -1109,7 +1109,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
}
catch (SocketException Exception)
{
Errno = ConvertError((WSAError)Exception.ErrorCode);
Errno = ConvertError((WsaError)Exception.ErrorCode);
}
}
@ -1123,7 +1123,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
(long ReceivePosition, long ReceiveLength) = Context.Request.GetBufferType0x22();
LinuxError Errno = LinuxError.EBADF;
LinuxError Errno = LinuxError.BadF;
BsdSocket Socket = RetrieveSocket(SocketFd);
int Result = -1;
@ -1138,7 +1138,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
}
catch (SocketException Exception)
{
Errno = ConvertError((WSAError)Exception.ErrorCode);
Errno = ConvertError((WsaError)Exception.ErrorCode);
}
}
@ -1150,7 +1150,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
{
int SocketFd = Context.RequestData.ReadInt32();
LinuxError Errno = LinuxError.EBADF;
LinuxError Errno = LinuxError.BadF;
BsdSocket Socket = RetrieveSocket(SocketFd);
if (Socket != null)
@ -1159,7 +1159,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
Sockets[SocketFd] = null;
Errno = LinuxError.SUCCESS;
Errno = LinuxError.Success;
}
return WriteBsdResult(Context, 0, Errno);
@ -1171,12 +1171,12 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
int SocketFd = Context.RequestData.ReadInt32();
ulong Reserved = Context.RequestData.ReadUInt64();
LinuxError Errno = LinuxError.ENOENT;
LinuxError Errno = LinuxError.NoEnt;
int NewSockFd = -1;
if (IsPrivileged)
{
Errno = LinuxError.EBADF;
Errno = LinuxError.BadF;
BsdSocket OldSocket = RetrieveSocket(SocketFd);

View file

@ -1,72 +1,72 @@
namespace Ryujinx.HLE.Loaders.Elf
{
enum ElfDynamicTag
internal enum ElfDynamicTag
{
DT_NULL = 0,
DT_NEEDED = 1,
DT_PLTRELSZ = 2,
DT_PLTGOT = 3,
DT_HASH = 4,
DT_STRTAB = 5,
DT_SYMTAB = 6,
DT_RELA = 7,
DT_RELASZ = 8,
DT_RELAENT = 9,
DT_STRSZ = 10,
DT_SYMENT = 11,
DT_INIT = 12,
DT_FINI = 13,
DT_SONAME = 14,
DT_RPATH = 15,
DT_SYMBOLIC = 16,
DT_REL = 17,
DT_RELSZ = 18,
DT_RELENT = 19,
DT_PLTREL = 20,
DT_DEBUG = 21,
DT_TEXTREL = 22,
DT_JMPREL = 23,
DT_BIND_NOW = 24,
DT_INIT_ARRAY = 25,
DT_FINI_ARRAY = 26,
DT_INIT_ARRAYSZ = 27,
DT_FINI_ARRAYSZ = 28,
DT_RUNPATH = 29,
DT_FLAGS = 30,
DT_ENCODING = 32,
DT_PREINIT_ARRAY = 32,
DT_PREINIT_ARRAYSZ = 33,
DT_GNU_PRELINKED = 0x6ffffdf5,
DT_GNU_CONFLICTSZ = 0x6ffffdf6,
DT_GNU_LIBLISTSZ = 0x6ffffdf7,
DT_CHECKSUM = 0x6ffffdf8,
DT_PLTPADSZ = 0x6ffffdf9,
DT_MOVEENT = 0x6ffffdfa,
DT_MOVESZ = 0x6ffffdfb,
DT_FEATURE_1 = 0x6ffffdfc,
DT_POSFLAG_1 = 0x6ffffdfd,
DT_SYMINSZ = 0x6ffffdfe,
DT_SYMINENT = 0x6ffffdff,
DT_GNU_HASH = 0x6ffffef5,
DT_TLSDESC_PLT = 0x6ffffef6,
DT_TLSDESC_GOT = 0x6ffffef7,
DT_GNU_CONFLICT = 0x6ffffef8,
DT_GNU_LIBLIST = 0x6ffffef9,
DT_CONFIG = 0x6ffffefa,
DT_DEPAUDIT = 0x6ffffefb,
DT_AUDIT = 0x6ffffefc,
DT_PLTPAD = 0x6ffffefd,
DT_MOVETAB = 0x6ffffefe,
DT_SYMINFO = 0x6ffffeff,
DT_VERSYM = 0x6ffffff0,
DT_RELACOUNT = 0x6ffffff9,
DT_RELCOUNT = 0x6ffffffa,
DT_FLAGS_1 = 0x6ffffffb,
DT_VERDEF = 0x6ffffffc,
DT_VERDEFNUM = 0x6ffffffd,
DT_VERNEED = 0x6ffffffe,
DT_VERNEEDNUM = 0x6fffffff,
DT_AUXILIARY = 0x7ffffffd,
DT_FILTER = 0x7fffffff
Null = 0,
Needed = 1,
PltRelSz = 2,
PltGoz = 3,
Hash = 4,
StrTab = 5,
SymTab = 6,
RelA = 7,
RelASz = 8,
RelAEnt = 9,
StrSz = 10,
SymEnt = 11,
Init = 12,
Fini = 13,
SoName = 14,
RPath = 15,
Symbolic = 16,
Rel = 17,
RelSz = 18,
RelEnt = 19,
PltRel = 20,
Debug = 21,
TextRel = 22,
JmpRel = 23,
BindNow = 24,
InitArray = 25,
FiniArray = 26,
InitArraySz = 27,
FiniArraySz = 28,
RunPath = 29,
Flags = 30,
Encoding = 32,
PreInitArray = 32,
PreInitArraySz = 33,
GnuPrelinked = 0x6ffffdf5,
GnuConflictSz = 0x6ffffdf6,
GnuLibListSz = 0x6ffffdf7,
Checksum = 0x6ffffdf8,
PltPadSz = 0x6ffffdf9,
MoveEnt = 0x6ffffdfa,
MoveSz = 0x6ffffdfb,
Feature1 = 0x6ffffdfc,
PosFlag1 = 0x6ffffdfd,
SymInSz = 0x6ffffdfe,
SymInEnt = 0x6ffffdff,
GnuHash = 0x6ffffef5,
TlsDescPlt = 0x6ffffef6,
TlsDescGot = 0x6ffffef7,
GnuConflict = 0x6ffffef8,
GnuLibList = 0x6ffffef9,
Config = 0x6ffffefa,
DepAudit = 0x6ffffefb,
Audit = 0x6ffffefc,
PltPad = 0x6ffffefd,
MoveTab = 0x6ffffefe,
SymInfo = 0x6ffffeff,
VerSym = 0x6ffffff0,
RelaCount = 0x6ffffff9,
RelCount = 0x6ffffffa,
Flags1 = 0x6ffffffb,
VerDef = 0x6ffffffc,
VerDefNum = 0x6ffffffd,
VerNeed = 0x6ffffffe,
VerNeedNum = 0x6fffffff,
Auxiliary = 0x7ffffffd,
Filter = 0x7fffffff
}
}

View file

@ -1,45 +1,45 @@
namespace Ryujinx.HLE.Utilities
{
enum LinuxError
internal enum LinuxError
{
SUCCESS = 0,
EPERM = 1 /* Operation not permitted */,
ENOENT = 2 /* No such file or directory */,
ESRCH = 3 /* No such process */,
EINTR = 4 /* Interrupted system call */,
EIO = 5 /* I/O error */,
ENXIO = 6 /* No such device or address */,
E2BIG = 7 /* Argument list too long */,
ENOEXEC = 8 /* Exec format error */,
EBADF = 9 /* Bad file number */,
ECHILD = 10 /* No child processes */,
EAGAIN = 11 /* Try again */,
ENOMEM = 12 /* Out of memory */,
EACCES = 13 /* Permission denied */,
EFAULT = 14 /* Bad address */,
ENOTBLK = 15 /* Block device required */,
EBUSY = 16 /* Device or resource busy */,
EEXIST = 17 /* File exists */,
EXDEV = 18 /* Cross-device link */,
ENODEV = 19 /* No such device */,
ENOTDIR = 20 /* Not a directory */,
EISDIR = 21 /* Is a directory */,
EINVAL = 22 /* Invalid argument */,
ENFILE = 23 /* File table overflow */,
EMFILE = 24 /* Too many open files */,
ENOTTY = 25 /* Not a typewriter */,
ETXTBSY = 26 /* Text file busy */,
EFBIG = 27 /* File too large */,
ENOSPC = 28 /* No space left on device */,
ESPIPE = 29 /* Illegal seek */,
EROFS = 30 /* Read-only file system */,
EMLINK = 31 /* Too many links */,
EPIPE = 32 /* Broken pipe */,
EDOM = 33 /* Math argument out of domain of func */,
ERANGE = 34 /* Math result not representable */,
EDEADLK = 35 /* Resource deadlock would occur */,
ENAMETOOLONG = 36 /* File name too long */,
ENOLCK = 37 /* No record locks available */,
Success = 0,
Perm = 1 /* Operation not permitted */,
NoEnt = 2 /* No such file or directory */,
Srch = 3 /* No such process */,
Intr = 4 /* Interrupted system call */,
Io = 5 /* I/O error */,
NxIo = 6 /* No such device or address */,
TooBig = 7 /* Argument list too long */,
NoExec = 8 /* Exec format error */,
BadF = 9 /* Bad file number */,
Child = 10 /* No child processes */,
Again = 11 /* Try again */,
NoMem = 12 /* Out of memory */,
Acces = 13 /* Permission denied */,
Fault = 14 /* Bad address */,
NotBlk = 15 /* Block device required */,
Busy = 16 /* Device or resource busy */,
Exist = 17 /* File exists */,
XDev = 18 /* Cross-device link */,
NoDev = 19 /* No such device */,
NotDir = 20 /* Not a directory */,
IsDir = 21 /* Is a directory */,
InVal = 22 /* Invalid argument */,
NFile = 23 /* File table overflow */,
MFile = 24 /* Too many open files */,
NoTty = 25 /* Not a typewriter */,
TxtBsy = 26 /* Text file busy */,
FBig = 27 /* File too large */,
NoSpc = 28 /* No space left on device */,
SPipe = 29 /* Illegal seek */,
RoFs = 30 /* Read-only file system */,
MLink = 31 /* Too many links */,
Pipe = 32 /* Broken pipe */,
Dom = 33 /* Math argument out of domain of func */,
Range = 34 /* Math result not representable */,
DeadLk = 35 /* Resource deadlock would occur */,
NameTooLong = 36 /* File name too long */,
NoLck = 37 /* No record locks available */,
/*
* This error code is special: arch syscall entry code will return
@ -48,105 +48,105 @@ namespace Ryujinx.HLE.Utilities
* failures due to attempts to use a nonexistent syscall, syscall
* implementations should refrain from returning -ENOSYS.
*/
ENOSYS = 38 /* Invalid system call number */,
ENOTEMPTY = 39 /* Directory not empty */,
ELOOP = 40 /* Too many symbolic links encountered */,
EWOULDBLOCK = EAGAIN /* Operation would block */,
ENOMSG = 42 /* No message of desired type */,
EIDRM = 43 /* Identifier removed */,
ECHRNG = 44 /* Channel number out of range */,
EL2NSYNC = 45 /* Level 2 not synchronized */,
EL3HLT = 46 /* Level 3 halted */,
EL3RST = 47 /* Level 3 reset */,
ELNRNG = 48 /* Link number out of range */,
EUNATCH = 49 /* Protocol driver not attached */,
ENOCSI = 50 /* No CSI structure available */,
EL2HLT = 51 /* Level 2 halted */,
EBADE = 52 /* Invalid exchange */,
EBADR = 53 /* Invalid request descriptor */,
EXFULL = 54 /* Exchange full */,
ENOANO = 55 /* No anode */,
EBADRQC = 56 /* Invalid request code */,
EBADSLT = 57 /* Invalid slot */,
EDEADLOCK = EDEADLK,
EBFONT = 59 /* Bad font file format */,
ENOSTR = 60 /* Device not a stream */,
ENODATA = 61 /* No data available */,
ETIME = 62 /* Timer expired */,
ENOSR = 63 /* Out of streams resources */,
ENONET = 64 /* Machine is not on the network */,
ENOPKG = 65 /* Package not installed */,
EREMOTE = 66 /* Object is remote */,
ENOLINK = 67 /* Link has been severed */,
EADV = 68 /* Advertise error */,
ESRMNT = 69 /* Srmount error */,
ECOMM = 70 /* Communication error on send */,
EPROTO = 71 /* Protocol error */,
EMULTIHOP = 72 /* Multihop attempted */,
EDOTDOT = 73 /* RFS specific error */,
EBADMSG = 74 /* Not a data message */,
EOVERFLOW = 75 /* Value too large for defined data type */,
ENOTUNIQ = 76 /* Name not unique on network */,
EBADFD = 77 /* File descriptor in bad state */,
EREMCHG = 78 /* Remote address changed */,
ELIBACC = 79 /* Can not access a needed shared library */,
ELIBBAD = 80 /* Accessing a corrupted shared library */,
ELIBSCN = 81 /* .lib section in a.out corrupted */,
ELIBMAX = 82 /* Attempting to link in too many shared libraries */,
ELIBEXEC = 83 /* Cannot exec a shared library directly */,
EILSEQ = 84 /* Illegal byte sequence */,
ERESTART = 85 /* Interrupted system call should be restarted */,
ESTRPIPE = 86 /* Streams pipe error */,
EUSERS = 87 /* Too many users */,
ENOTSOCK = 88 /* Socket operation on non-socket */,
EDESTADDRREQ = 89 /* Destination address required */,
EMSGSIZE = 90 /* Message too long */,
EPROTOTYPE = 91 /* Protocol wrong type for socket */,
ENOPROTOOPT = 92 /* Protocol not available */,
EPROTONOSUPPORT = 93 /* Protocol not supported */,
ESOCKTNOSUPPORT = 94 /* Socket type not supported */,
EOPNOTSUPP = 95 /* Operation not supported on transport endpoint */,
EPFNOSUPPORT = 96 /* Protocol family not supported */,
EAFNOSUPPORT = 97 /* Address family not supported by protocol */,
EADDRINUSE = 98 /* Address already in use */,
EADDRNOTAVAIL = 99 /* Cannot assign requested address */,
ENETDOWN = 100 /* Network is down */,
ENETUNREACH = 101 /* Network is unreachable */,
ENETRESET = 102 /* Network dropped connection because of reset */,
ECONNABORTED = 103 /* Software caused connection abort */,
ECONNRESET = 104 /* Connection reset by peer */,
ENOBUFS = 105 /* No buffer space available */,
EISCONN = 106 /* Transport endpoint is already connected */,
ENOTCONN = 107 /* Transport endpoint is not connected */,
ESHUTDOWN = 108 /* Cannot send after transport endpoint shutdown */,
ETOOMANYREFS = 109 /* Too many references: cannot splice */,
ETIMEDOUT = 110 /* Connection timed out */,
ECONNREFUSED = 111 /* Connection refused */,
EHOSTDOWN = 112 /* Host is down */,
EHOSTUNREACH = 113 /* No route to host */,
EALREADY = 114 /* Operation already in progress */,
EINPROGRESS = 115 /* Operation now in progress */,
ESTALE = 116 /* Stale file handle */,
EUCLEAN = 117 /* Structure needs cleaning */,
ENOTNAM = 118 /* Not a XENIX named type file */,
ENAVAIL = 119 /* No XENIX semaphores available */,
EISNAM = 120 /* Is a named type file */,
EREMOTEIO = 121 /* Remote I/O error */,
EDQUOT = 122 /* Quota exceeded */,
ENOMEDIUM = 123 /* No medium found */,
EMEDIUMTYPE = 124 /* Wrong medium type */,
ECANCELED = 125 /* Operation Canceled */,
ENOKEY = 126 /* Required key not available */,
EKEYEXPIRED = 127 /* Key has expired */,
EKEYREVOKED = 128 /* Key has been revoked */,
EKEYREJECTED = 129 /* Key was rejected by service */,
NoSys = 38 /* Invalid system call number */,
NotEmpty = 39 /* Directory not empty */,
Loop = 40 /* Too many symbolic links encountered */,
WouldBlock = Again /* Operation would block */,
NoMsg = 42 /* No message of desired type */,
IdRm = 43 /* Identifier removed */,
ChRng = 44 /* Channel number out of range */,
L2NSync = 45 /* Level 2 not synchronized */,
L3Hlt = 46 /* Level 3 halted */,
L3Rst = 47 /* Level 3 reset */,
LnRng = 48 /* Link number out of range */,
UnAtch = 49 /* Protocol driver not attached */,
NoCsi = 50 /* No CSI structure available */,
L2Hlt = 51 /* Level 2 halted */,
BadE = 52 /* Invalid exchange */,
BadR = 53 /* Invalid request descriptor */,
XFull = 54 /* Exchange full */,
NoAno = 55 /* No anode */,
BadRqC = 56 /* Invalid request code */,
BadSlt = 57 /* Invalid slot */,
DeadLock = DeadLk,
BFont = 59 /* Bad font file format */,
NoStr = 60 /* Device not a stream */,
NoData = 61 /* No data available */,
Time = 62 /* Timer expired */,
NoSr = 63 /* Out of streams resources */,
NoNet = 64 /* Machine is not on the network */,
NoPkg = 65 /* Package not installed */,
Remote = 66 /* Object is remote */,
NoLink = 67 /* Link has been severed */,
Adv = 68 /* Advertise error */,
Stmnt = 69 /* Srmount error */,
Comm = 70 /* Communication error on send */,
Proto = 71 /* Protocol error */,
Multihop = 72 /* Multihop attempted */,
DotDot = 73 /* RFS specific error */,
BadMsg = 74 /* Not a data message */,
Overflow = 75 /* Value too large for defined data type */,
NotUniq = 76 /* Name not unique on network */,
BadFd = 77 /* File descriptor in bad state */,
RemChg = 78 /* Remote address changed */,
LibAcc = 79 /* Can not access a needed shared library */,
LibBad = 80 /* Accessing a corrupted shared library */,
LibScn = 81 /* .lib section in a.out corrupted */,
LibMax = 82 /* Attempting to link in too many shared libraries */,
LibExec = 83 /* Cannot exec a shared library directly */,
IlSeq = 84 /* Illegal byte sequence */,
Restart = 85 /* Interrupted system call should be restarted */,
StrPipe = 86 /* Streams pipe error */,
Users = 87 /* Too many users */,
NotSock = 88 /* Socket operation on non-socket */,
DestAddrReq = 89 /* Destination address required */,
MsgSize = 90 /* Message too long */,
ProtoType = 91 /* Protocol wrong type for socket */,
NoProtoOpt = 92 /* Protocol not available */,
ProtoNoSupport = 93 /* Protocol not supported */,
SocktNoSupport = 94 /* Socket type not supported */,
OpNotSupp = 95 /* Operation not supported on transport endpoint */,
PfNoSupport = 96 /* Protocol family not supported */,
AfNoSupport = 97 /* Address family not supported by protocol */,
AddrInUse = 98 /* Address already in use */,
AddrNotAvail = 99 /* Cannot assign requested address */,
NetDown = 100 /* Network is down */,
NetUnReach = 101 /* Network is unreachable */,
NetReset = 102 /* Network dropped connection because of reset */,
ConnAborted = 103 /* Software caused connection abort */,
ConnReset = 104 /* Connection reset by peer */,
NoBufs = 105 /* No buffer space available */,
IsConn = 106 /* Transport endpoint is already connected */,
NotConn = 107 /* Transport endpoint is not connected */,
Shutdown = 108 /* Cannot send after transport endpoint shutdown */,
TooManyRefs = 109 /* Too many references: cannot splice */,
TimedOut = 110 /* Connection timed out */,
ConnRefused = 111 /* Connection refused */,
HostDown = 112 /* Host is down */,
HostUnReach = 113 /* No route to host */,
Already = 114 /* Operation already in progress */,
InProgress = 115 /* Operation now in progress */,
Stale = 116 /* Stale file handle */,
UClean = 117 /* Structure needs cleaning */,
NotNam = 118 /* Not a XENIX named type file */,
NAvail = 119 /* No XENIX semaphores available */,
IsNam = 120 /* Is a named type file */,
RemoteIo = 121 /* Remote I/O error */,
DQuot = 122 /* Quota exceeded */,
NoMedium = 123 /* No medium found */,
MediumType = 124 /* Wrong medium type */,
Canceled = 125 /* Operation Canceled */,
NoKey = 126 /* Required key not available */,
KeyExpired = 127 /* Key has expired */,
KeyRevoked = 128 /* Key has been revoked */,
KeyRejected = 129 /* Key was rejected by service */,
/* for robust mutexes */
EOWNERDEAD = 130 /* Owner died */,
ENOTRECOVERABLE = 131 /* State not recoverable */,
OwnerDead = 130 /* Owner died */,
NotRecoverable = 131 /* State not recoverable */,
ERFKILL = 132 /* Operation not possible due to RF-kill */,
RfKill = 132 /* Operation not possible due to RF-kill */,
EHWPOISON = 133 /* Memory page has hardware error */,
HwPoison = 133 /* Memory page has hardware error */,
}
}

View file

@ -1,82 +1,82 @@
namespace Ryujinx.HLE.Utilities
{
enum WSAError
internal enum WsaError
{
/*
* All Windows Sockets error constants are biased by WSABASEERR from
* the "normal"
*/
WSABASEERR = 10000,
BaseError = 10000,
/*
* Windows Sockets definitions of regular Microsoft C error constants
*/
WSAEINTR = (WSABASEERR + 4),
WSAEBADF = (WSABASEERR + 9),
WSAEACCES = (WSABASEERR + 13),
WSAEFAULT = (WSABASEERR + 14),
WSAEINVAL = (WSABASEERR + 22),
WSAEMFILE = (WSABASEERR + 24),
Interrupted = (BaseError + 4),
BadFileHandle = (BaseError + 9),
AccessDenied = (BaseError + 13),
Fault = (BaseError + 14),
InvalidArgument = (BaseError + 22),
TooManyOpenSockets = (BaseError + 24),
/*
* Windows Sockets definitions of regular Berkeley error constants
*/
WSAEWOULDBLOCK = (WSABASEERR + 35),
WSAEINPROGRESS = (WSABASEERR + 36),
WSAEALREADY = (WSABASEERR + 37),
WSAENOTSOCK = (WSABASEERR + 38),
WSAEDESTADDRREQ = (WSABASEERR + 39),
WSAEMSGSIZE = (WSABASEERR + 40),
WSAEPROTOTYPE = (WSABASEERR + 41),
WSAENOPROTOOPT = (WSABASEERR + 42),
WSAEPROTONOSUPPORT = (WSABASEERR + 43),
WSAESOCKTNOSUPPORT = (WSABASEERR + 44),
WSAEOPNOTSUPP = (WSABASEERR + 45),
WSAEPFNOSUPPORT = (WSABASEERR + 46),
WSAEAFNOSUPPORT = (WSABASEERR + 47),
WSAEADDRINUSE = (WSABASEERR + 48),
WSAEADDRNOTAVAIL = (WSABASEERR + 49),
WSAENETDOWN = (WSABASEERR + 50),
WSAENETUNREACH = (WSABASEERR + 51),
WSAENETRESET = (WSABASEERR + 52),
WSAECONNABORTED = (WSABASEERR + 53),
WSAECONNRESET = (WSABASEERR + 54),
WSAENOBUFS = (WSABASEERR + 55),
WSAEISCONN = (WSABASEERR + 56),
WSAENOTCONN = (WSABASEERR + 57),
WSAESHUTDOWN = (WSABASEERR + 58),
WSAETOOMANYREFS = (WSABASEERR + 59),
WSAETIMEDOUT = (WSABASEERR + 60),
WSAECONNREFUSED = (WSABASEERR + 61),
WSAELOOP = (WSABASEERR + 62),
WSAENAMETOOLONG = (WSABASEERR + 63),
WSAEHOSTDOWN = (WSABASEERR + 64),
WSAEHOSTUNREACH = (WSABASEERR + 65),
WSAENOTEMPTY = (WSABASEERR + 66),
WSAEPROCLIM = (WSABASEERR + 67),
WSAEUSERS = (WSABASEERR + 68),
WSAEDQUOT = (WSABASEERR + 69),
WSAESTALE = (WSABASEERR + 70),
WSAEREMOTE = (WSABASEERR + 71),
WouldBlock = (BaseError + 35),
InProgress = (BaseError + 36),
AlreadyInProgress = (BaseError + 37),
NotSocket = (BaseError + 38),
DestinationAddressRequired = (BaseError + 39),
MessageSize = (BaseError + 40),
ProtocolType = (BaseError + 41),
ProtocolOption = (BaseError + 42),
ProtocolNotSupported = (BaseError + 43),
SocketNotSupported = (BaseError + 44),
OperationNotSupported = (BaseError + 45),
ProtocolFamilyNotSupported = (BaseError + 46),
AddressFamilyNotSupported = (BaseError + 47),
AddressAlreadyInUse = (BaseError + 48),
AddressNotAvailable = (BaseError + 49),
NetworkDown = (BaseError + 50),
NetworkUnreachable = (BaseError + 51),
NetworkReset = (BaseError + 52),
ConnectionAborted = (BaseError + 53),
ConnectionReset = (BaseError + 54),
NoBufferSpaceAvailable = (BaseError + 55),
IsConnected = (BaseError + 56),
NotConnected = (BaseError + 57),
Shutdown = (BaseError + 58),
TooManyReferences = (BaseError + 59),
TimedOut = (BaseError + 60),
ConnectionRefused = (BaseError + 61),
Loop = (BaseError + 62),
NameTooLong = (BaseError + 63),
HostDown = (BaseError + 64),
HostUnreachable = (BaseError + 65),
NotEmpty = (BaseError + 66),
ProcessLimit = (BaseError + 67),
UserQuota = (BaseError + 68),
DiskQuota = (BaseError + 69),
Stale = (BaseError + 70),
Remote = (BaseError + 71),
/*
* Extended Windows Sockets error constant definitions
*/
WSASYSNOTREADY = (WSABASEERR + 91),
WSAVERNOTSUPPORTED = (WSABASEERR + 92),
WSANOTINITIALISED = (WSABASEERR + 93),
WSAEDISCON = (WSABASEERR + 101),
WSAENOMORE = (WSABASEERR + 102),
WSAECANCELLED = (WSABASEERR + 103),
WSAEINVALIDPROCTABLE = (WSABASEERR + 104),
WSAEINVALIDPROVIDER = (WSABASEERR + 105),
WSAEPROVIDERFAILEDINIT = (WSABASEERR + 106),
WSASYSCALLFAILURE = (WSABASEERR + 107),
WSASERVICE_NOT_FOUND = (WSABASEERR + 108),
WSATYPE_NOT_FOUND = (WSABASEERR + 109),
WSA_E_NO_MORE = (WSABASEERR + 110),
WSA_E_CANCELLED = (WSABASEERR + 111),
WSAEREFUSED = (WSABASEERR + 112),
SystemNotReady = (BaseError + 91),
VersionNotSupported = (BaseError + 92),
NotInitialized = (BaseError + 93),
Disconnecting = (BaseError + 101),
NoMoreResultsOld = (BaseError + 102),
CancelledOld = (BaseError + 103),
InvalidProcedureCallTable = (BaseError + 104),
InvalidProvider = (BaseError + 105),
ProviderFailedInit = (BaseError + 106),
SysCallFailure = (BaseError + 107),
ServiceNotFound = (BaseError + 108),
TypeNotFound = (BaseError + 109),
NoMoreResults = (BaseError + 110),
Cancelled = (BaseError + 111),
Refused = (BaseError + 112),
/*
* Error return codes from gethostbyname() and gethostbyaddr()
@ -90,42 +90,42 @@
*/
/* Authoritative Answer: Host not found */
WSAHOST_NOT_FOUND = (WSABASEERR + 1001),
HostNotFound = (BaseError + 1001),
/* Non-Authoritative: Host not found, or SERVERFAIL */
WSATRY_AGAIN = (WSABASEERR + 1002),
TryAgain = (BaseError + 1002),
/* Non-recoverable errors, FORMERR, REFUSED, NOTIMP */
WSANO_RECOVERY = (WSABASEERR + 1003),
NoRecovery = (BaseError + 1003),
/* Valid name, no data record of requested type */
WSANO_DATA = (WSABASEERR + 1004),
NoData = (BaseError + 1004),
/*
* Define QOS related error return codes
*
*/
WSA_QOS_RECEIVERS = (WSABASEERR + 1005),
QosReceivers = (BaseError + 1005),
/* at least one Reserve has arrived */
WSA_QOS_SENDERS = (WSABASEERR + 1006),
QosSenders = (BaseError + 1006),
/* at least one Path has arrived */
WSA_QOS_NO_SENDERS = (WSABASEERR + 1007),
QosNoSenders = (BaseError + 1007),
/* there are no senders */
WSA_QOS_NO_RECEIVERS = (WSABASEERR + 1008),
QosNoReceivers = (BaseError + 1008),
/* there are no receivers */
WSA_QOS_REQUEST_CONFIRMED = (WSABASEERR + 1009),
QosRequestConfirmed = (BaseError + 1009),
/* Reserve has been confirmed */
WSA_QOS_ADMISSION_FAILURE = (WSABASEERR + 1010),
QosAdmissionFailure = (BaseError + 1010),
/* error due to lack of resources */
WSA_QOS_POLICY_FAILURE = (WSABASEERR + 1011),
QosPolicyFailure = (BaseError + 1011),
/* rejected for administrative reasons - bad credentials */
WSA_QOS_BAD_STYLE = (WSABASEERR + 1012),
QosBadStyle = (BaseError + 1012),
/* unknown or conflicting style */
WSA_QOS_BAD_OBJECT = (WSABASEERR + 1013),
QosBadObject = (BaseError + 1013),
/* problem with some part of the filterspec or providerspecific
* buffer in general */
WSA_QOS_TRAFFIC_CTRL_ERROR = (WSABASEERR + 1014),
QosTrafficCtrlError = (BaseError + 1014),
/* problem with some part of the flowspec */
WSA_QOS_GENERIC_ERROR = (WSABASEERR + 1015),
QosGenericError = (BaseError + 1015),
}
}