TEST COMMIT

Change-Id: I65a9e237f8581efbaf69de18223b3c3e42a592f6
This commit is contained in:
David van Moolenbroek 2016-02-27 17:45:02 +00:00
parent 28aa92fd90
commit c8354c8391
16 changed files with 20 additions and 15 deletions

View File

@ -185,7 +185,12 @@ void exception_handler(int is_nested, reg_t *saved_lr, int vector)
* hard to debug problems (instruction executing being off by one)
* and this assumption needs re-examining, hence the assert.
*/
if (*saved_lr != ifar)
printf("KERNEL: mismatch - 0x%"PRIx32" vs 0x%"PRIx32"\n",
*saved_lr, ifar);
#if 0
assert(*saved_lr == ifar);
#endif
pagefault(saved_proc, saved_lr, is_nested, ifar, ifsr);
return;
}

View File

@ -60,7 +60,7 @@ int accept(int sock, struct sockaddr *__restrict address,
nwio_udpopt_t udpopt;
r = __accept(sock, address, address_len);
if (r != -1 || errno != ENOTSOCK)
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
return r;
r= _tcp_accept(sock, address, address_len);

View File

@ -58,7 +58,7 @@ int bind(int sock, const struct sockaddr *address, socklen_t address_len)
struct sockaddr_un uds_addr;
r = __bind(sock, address, address_len);
if (r != -1 || errno != ENOTSOCK)
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
return r;
r= ioctl(sock, NWIOGTCPCONF, &tcpconf);

View File

@ -57,7 +57,7 @@ int connect(int sock, const struct sockaddr *address,
nwio_udpopt_t udpopt;
r = __connect(sock, address, address_len);
if (r != -1 || errno != ENOTSOCK)
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
return r;
r= ioctl(sock, NWIOGTCPCONF, &tcpconf);

View File

@ -60,7 +60,7 @@ int getpeername(int sock, struct sockaddr *__restrict address,
struct sockaddr_un uds_addr;
r = __getpeername(sock, address, address_len);
if (r != -1 || errno != ENOTSOCK)
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
return r;
r= ioctl(sock, NWIOGTCPCONF, &tcpconf);

View File

@ -62,7 +62,7 @@ int getsockname(int fd, struct sockaddr *__restrict address,
struct sockaddr_un uds_addr;
r = __getsockname(fd, address, address_len);
if (r != -1 || errno != ENOTSOCK)
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
return r;
#if DEBUG

View File

@ -68,7 +68,7 @@ int getsockopt(int sock, int level, int option_name,
struct sockaddr_un uds_addr;
r = __getsockopt(sock, level, option_name, option_value, option_len);
if (r != -1 || errno != ENOTSOCK)
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
return r;
r= ioctl(sock, NWIOGTCPOPT, &tcpopt);

View File

@ -35,7 +35,7 @@ int listen(int sock, int backlog)
int r;
r = __listen(sock, backlog);
if (r != -1 || errno != ENOTSOCK)
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
return r;
r= ioctl(sock, NWIOTCPLISTENQ, &backlog);

View File

@ -81,7 +81,7 @@ ssize_t recvfrom(int sock, void *__restrict buffer, size_t length,
int uds_sotype = -1;
r = __recvfrom(sock, buffer, length, flags, address, address_len);
if (r != -1 || errno != ENOTSOCK)
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
return r;
#if DEBUG

View File

@ -90,7 +90,7 @@ ssize_t recvmsg(int sock, struct msghdr *msg, int flags)
int uds_sotype;
r = __recvmsg(sock, msg, flags);
if (r != -1 || errno != ENOTSOCK)
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
return r;
if (msg == NULL) {

View File

@ -88,7 +88,7 @@ ssize_t sendmsg(int sock, const struct msghdr *msg, int flags)
int uds_sotype;
r = __sendmsg(sock, msg, flags);
if (r != -1 || errno != ENOTSOCK)
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
return r;
if (msg == NULL) {

View File

@ -63,7 +63,7 @@ ssize_t sendto(int sock, const void *message, size_t length, int flags,
int uds_sotype = -1;
r = __sendto(sock, message, length, flags, dest_addr, dest_len);
if (r != -1 || errno != ENOTSOCK)
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
return r;
r= ioctl(sock, NWIOGTCPOPT, &tcpopt);

View File

@ -56,7 +56,7 @@ int setsockopt(int sock, int level, int option_name,
struct sockaddr_un uds_addr;
r = __setsockopt(sock, level, option_name, option_value, option_len);
if (r != -1 || errno != ENOTSOCK)
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
return r;
r= ioctl(sock, NWIOGTCPOPT, &tcpopt);

View File

@ -40,7 +40,7 @@ int shutdown(int sock, int how)
nwio_tcpconf_t tcpconf;
r = __shutdown(sock, how);
if (r != -1 || errno != ENOTSOCK)
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
return r;
r= ioctl(sock, NWIOGTCPCONF, &tcpconf);

View File

@ -60,7 +60,7 @@ int socket(int domain, int type, int protocol)
int r, sock_type;
r = __socket(domain, type, protocol);
if (r != -1 || errno != EAFNOSUPPORT)
if (r != -1 || (errno != EAFNOSUPPORT && errno != ENOSYS))
return r;
sock_type = type & ~SOCK_FLAGS_MASK;

View File

@ -45,7 +45,7 @@ socketpair(int domain, int type, int protocol, int sv[2])
int r;
r = __socketpair(domain, type, protocol, sv);
if (r != -1 || errno != EAFNOSUPPORT)
if (r != -1 || (errno != EAFNOSUPPORT && errno != ENOSYS))
return r;
#if DEBUG