Add ESOCKTNOSUPPORT.

This commit is contained in:
Jonas 'Sortie' Termansen 2024-06-23 19:56:50 +02:00
parent 23bce072c0
commit 5c896e027a
4 changed files with 4 additions and 2 deletions

View File

@ -679,7 +679,7 @@ Ref<Inode> Socket(int type, int protocol)
switch ( type )
{
case SOCK_STREAM: return Ref<Inode>(new StreamSocket(0, 0, 0600, manager));
default: return errno = EPROTOTYPE, Ref<Inode>(NULL);
default: return errno = ESOCKTNOSUPPORT, Ref<Inode>(NULL);
}
}

View File

@ -445,7 +445,7 @@ Ref<Inode> Socket(int type, int protocol)
if ( protocol == 0 || protocol == IPPROTO_TCP )
return TCP::Socket(AF_INET);
return errno = EPROTONOSUPPORT, Ref<Inode>(NULL);
default: return errno = EPROTOTYPE, Ref<Inode>(NULL);
default: return errno = ESOCKTNOSUPPORT, Ref<Inode>(NULL);
}
}

View File

@ -109,6 +109,7 @@
#define ENOMOUNT 99
#define ENOMEDIUM 100
#define EHOSTDOWN 101
#define ESOCKTNOSUPPORT 102
#define EOPNOTSUPP ENOTSUP
#define EWOULDBLOCK EAGAIN

View File

@ -111,6 +111,7 @@ char* strerror(int errnum)
case ENOMOUNT: return "No such mountpoint";
case ENOMEDIUM: return "No medium found";
case EHOSTDOWN: return "Host is down";
case ESOCKTNOSUPPORT: "Socket type is not supported";
default: return "Unknown error condition";
}
}