Add ESOCKTNOSUPPORT.
This commit is contained in:
parent
23bce072c0
commit
5c896e027a
4 changed files with 4 additions and 2 deletions
|
@ -679,7 +679,7 @@ Ref<Inode> Socket(int type, int protocol)
|
||||||
switch ( type )
|
switch ( type )
|
||||||
{
|
{
|
||||||
case SOCK_STREAM: return Ref<Inode>(new StreamSocket(0, 0, 0600, manager));
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -445,7 +445,7 @@ Ref<Inode> Socket(int type, int protocol)
|
||||||
if ( protocol == 0 || protocol == IPPROTO_TCP )
|
if ( protocol == 0 || protocol == IPPROTO_TCP )
|
||||||
return TCP::Socket(AF_INET);
|
return TCP::Socket(AF_INET);
|
||||||
return errno = EPROTONOSUPPORT, Ref<Inode>(NULL);
|
return errno = EPROTONOSUPPORT, Ref<Inode>(NULL);
|
||||||
default: return errno = EPROTOTYPE, Ref<Inode>(NULL);
|
default: return errno = ESOCKTNOSUPPORT, Ref<Inode>(NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -109,6 +109,7 @@
|
||||||
#define ENOMOUNT 99
|
#define ENOMOUNT 99
|
||||||
#define ENOMEDIUM 100
|
#define ENOMEDIUM 100
|
||||||
#define EHOSTDOWN 101
|
#define EHOSTDOWN 101
|
||||||
|
#define ESOCKTNOSUPPORT 102
|
||||||
|
|
||||||
#define EOPNOTSUPP ENOTSUP
|
#define EOPNOTSUPP ENOTSUP
|
||||||
#define EWOULDBLOCK EAGAIN
|
#define EWOULDBLOCK EAGAIN
|
||||||
|
|
|
@ -111,6 +111,7 @@ char* strerror(int errnum)
|
||||||
case ENOMOUNT: return "No such mountpoint";
|
case ENOMOUNT: return "No such mountpoint";
|
||||||
case ENOMEDIUM: return "No medium found";
|
case ENOMEDIUM: return "No medium found";
|
||||||
case EHOSTDOWN: return "Host is down";
|
case EHOSTDOWN: return "Host is down";
|
||||||
|
case ESOCKTNOSUPPORT: "Socket type is not supported";
|
||||||
default: return "Unknown error condition";
|
default: return "Unknown error condition";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue