nwio_udpopt_t udpopt;
r= _tcp_accept(sock, address, address_len);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
return r;
r= _uds_accept(sock, address, address_len);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
return r;
/* Unfortunately, we have to return EOPNOTSUPP for a socket that
errno= EOPNOTSUPP;
return -1;
}
- if ((errno == ENOTTY || errno == EBADIOCTL))
+ if (errno == ENOTTY)
{
errno= ENOTSOCK;
return -1;
struct sockaddr_un uds_addr;
r= ioctl(sock, NWIOGTCPCONF, &tcpconf);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
return r;
}
r= ioctl(sock, NWIOGUDPOPT, &udpopt);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
return r;
}
r= ioctl(sock, NWIOGUDSADDR, &uds_addr);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
return r;
nwio_udpopt_t udpopt;
r= ioctl(sock, NWIOGTCPCONF, &tcpconf);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
{
}
r= ioctl(sock, NWIOGUDPOPT, &udpopt);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
{
}
r= _uds_connect(sock, address, address_len);
- if (r != -1 ||
- (errno != ENOTTY && errno != EBADIOCTL &&
- errno != EAFNOSUPPORT))
+ if (r != -1 || (errno != ENOTTY && errno != EAFNOSUPPORT))
{
if (r == -1)
{
struct sockaddr_un uds_addr;
r= ioctl(sock, NWIOGTCPCONF, &tcpconf);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
{
}
r= ioctl(sock, NWIOGUDPOPT, &udpopt);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
{
}
r= ioctl(sock, NWIOGUDSPADDR, &uds_addr);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
{
#endif
r= ioctl(fd, NWIOGTCPCONF, &tcpconf);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
{
}
r= ioctl(fd, NWIOGUDPOPT, &udpopt);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
{
}
r= ioctl(fd, NWIOGUDSADDR, &uds_addr);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
{
struct sockaddr_un uds_addr;
r= ioctl(sock, NWIOGTCPOPT, &tcpopt);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
{
}
r= ioctl(sock, NWIOGUDPOPT, &udpopt);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
{
}
r= ioctl(sock, NWIOGUDSADDR, &uds_addr);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
{
int r;
r= ioctl(sock, NWIOTCPLISTENQ, &backlog);
- if (r != -1 || errno != EBADIOCTL)
+ if (r != -1 || errno != ENOTTY)
return r;
r= ioctl(sock, NWIOSUDSBLOG, &backlog);
- if (r != -1 || errno != EBADIOCTL)
+ if (r != -1 || errno != ENOTTY)
return r;
#if DEBUG
#endif
r= ioctl(sock, NWIOGTCPCONF, &tcpconf);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
return r;
}
r= ioctl(sock, NWIOGUDPOPT, &udpopt);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
return r;
}
r= ioctl(sock, NWIOGUDSSOTYPE, &uds_sotype);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1) {
}
r= ioctl(sock, NWIOGUDSSOTYPE, &uds_sotype);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL)) {
+ if (r != -1 || errno != ENOTTY) {
if (r == -1) {
return r;
}
}
r= ioctl(sock, NWIOGUDSSOTYPE, &uds_sotype);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL)) {
+ if (r != -1 || errno != ENOTTY) {
if (r == -1) {
return r;
}
int uds_sotype = -1;
r= ioctl(sock, NWIOGTCPOPT, &tcpopt);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
return r;
}
r= ioctl(sock, NWIOGUDPOPT, &udpopt);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
return r;
}
r= ioctl(sock, NWIOGUDSSOTYPE, &uds_sotype);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1) {
return r;
struct sockaddr_un uds_addr;
r= ioctl(sock, NWIOGTCPOPT, &tcpopt);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
{
}
r= ioctl(sock, NWIOGUDPOPT, &udpopt);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
{
}
r= ioctl(sock, NWIOGUDSADDR, &uds_addr);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
{
nwio_tcpconf_t tcpconf;
r= ioctl(sock, NWIOGTCPCONF, &tcpconf);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
{
}
r= ioctl(sock, NWIOGUDSADDR, &uds_addr);
- if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
+ if (r != -1 || errno != ENOTTY)
{
if (r == -1)
{
.It Er 51 ENOBUFS Em "\&No buffer space available" .
An operation on a socket or pipe was not performed because
the system lacked sufficient buffer space or because a queue was full.
-.It Er 52 EBADIOCTL Em "Illegal ioctl for device" .
.It Er 53 EBADMODE Em "Bad mode in ioctl" .
.It Er 54 EWOULDBLOCK Em "Would block" .
.It Er 55 ENETUNREACH Em "Network is unreachable" .
large or too small.
.IP ENOBUFS
The TCP/IP server has insufficient memory to execute the request.
-.IP EBADIOCTL
+.IP ENOTTY
This indicates an attempt to execute a command the particular server
does not understand.
For example, a
/* The following errors relate to networking. */
#define EPACKSIZE (_SIGN 50 ) /* invalid packet size for some protocol */
#define ENOBUFS (_SIGN 51 ) /* not enough buffers left */
-#define EBADIOCTL (_SIGN 52 ) /* illegal ioctl for device */
#define EBADMODE (_SIGN 53 ) /* badmode in ioctl */
#define EWOULDBLOCK (_SIGN 54 ) /* call would block on nonblocking socket */
#define ENETUNREACH (_SIGN 55 ) /* network unreachable */
errno = 0;
rc = listen(0, 0);
- if (!(rc == -1 && errno == ENOTTY)) {
+ /* Test on errno disabled here: there's currently no telling what this
+ * will return. POSIX says it should be ENOTSOCK, MINIX3 libc returns
+ * ENOSYS, and we used to test for ENOTTY here..
+ */
+ if (!(rc == -1)) {
test_fail("listen(0, 0) should have failed");
}