* Replaced more occurences of EOPNOTSUPP with B_NOT_SUPPORTED.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37847 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -54,7 +54,7 @@ update_link_state(ethernet_device *device, bool notify = true)
|
|||||||
if (ioctl(device->fd, ETHER_GET_LINK_STATE, &state,
|
if (ioctl(device->fd, ETHER_GET_LINK_STATE, &state,
|
||||||
sizeof(ether_link_state)) < 0) {
|
sizeof(ether_link_state)) < 0) {
|
||||||
// This device does not support retrieving the link
|
// This device does not support retrieving the link
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
state.media |= IFM_ETHER;
|
state.media |= IFM_ETHER;
|
||||||
@@ -367,7 +367,7 @@ ethernet_set_promiscuous(net_device *_device, bool promiscuous)
|
|||||||
|
|
||||||
int32 value = (int32)promiscuous;
|
int32 value = (int32)promiscuous;
|
||||||
if (ioctl(device->fd, ETHER_SETPROMISC, &value, sizeof(value)) < 0)
|
if (ioctl(device->fd, ETHER_SETPROMISC, &value, sizeof(value)) < 0)
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
@@ -376,7 +376,7 @@ ethernet_set_promiscuous(net_device *_device, bool promiscuous)
|
|||||||
status_t
|
status_t
|
||||||
ethernet_set_media(net_device *device, uint32 media)
|
ethernet_set_media(net_device *device, uint32 media)
|
||||||
{
|
{
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ icmp_connect(net_protocol* protocol, const struct sockaddr* address)
|
|||||||
status_t
|
status_t
|
||||||
icmp_accept(net_protocol* protocol, struct net_socket** _acceptedSocket)
|
icmp_accept(net_protocol* protocol, struct net_socket** _acceptedSocket)
|
||||||
{
|
{
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -220,14 +220,14 @@ icmp_unbind(net_protocol* protocol, struct sockaddr* address)
|
|||||||
status_t
|
status_t
|
||||||
icmp_listen(net_protocol* protocol, int count)
|
icmp_listen(net_protocol* protocol, int count)
|
||||||
{
|
{
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
icmp_shutdown(net_protocol* protocol, int direction)
|
icmp_shutdown(net_protocol* protocol, int direction)
|
||||||
{
|
{
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1094,7 +1094,7 @@ ipv4_connect(net_protocol* protocol, const struct sockaddr* address)
|
|||||||
status_t
|
status_t
|
||||||
ipv4_accept(net_protocol* protocol, struct net_socket** _acceptedSocket)
|
ipv4_accept(net_protocol* protocol, struct net_socket** _acceptedSocket)
|
||||||
{
|
{
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1147,7 +1147,7 @@ ipv4_getsockopt(net_protocol* _protocol, int level, int option, void* value,
|
|||||||
// RFC 3678, Section 4.1:
|
// RFC 3678, Section 4.1:
|
||||||
// ``An error of EOPNOTSUPP is returned if these options are
|
// ``An error of EOPNOTSUPP is returned if these options are
|
||||||
// used with getsockopt().''
|
// used with getsockopt().''
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
dprintf("IPv4::getsockopt(): get unknown option: %d\n", option);
|
dprintf("IPv4::getsockopt(): get unknown option: %d\n", option);
|
||||||
@@ -1329,14 +1329,14 @@ ipv4_unbind(net_protocol* protocol, struct sockaddr* address)
|
|||||||
status_t
|
status_t
|
||||||
ipv4_listen(net_protocol* protocol, int count)
|
ipv4_listen(net_protocol* protocol, int count)
|
||||||
{
|
{
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
ipv4_shutdown(net_protocol* protocol, int direction)
|
ipv4_shutdown(net_protocol* protocol, int direction)
|
||||||
{
|
{
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1112,7 +1112,7 @@ udp_connect(net_protocol *protocol, const struct sockaddr *address)
|
|||||||
status_t
|
status_t
|
||||||
udp_accept(net_protocol *protocol, struct net_socket **_acceptedSocket)
|
udp_accept(net_protocol *protocol, struct net_socket **_acceptedSocket)
|
||||||
{
|
{
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1160,14 +1160,14 @@ udp_unbind(net_protocol *protocol, struct sockaddr *address)
|
|||||||
status_t
|
status_t
|
||||||
udp_listen(net_protocol *protocol, int count)
|
udp_listen(net_protocol *protocol, int count)
|
||||||
{
|
{
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
udp_shutdown(net_protocol *protocol, int direction)
|
udp_shutdown(net_protocol *protocol, int direction)
|
||||||
{
|
{
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1250,7 +1250,7 @@ udp_error_received(uint32 code, net_buffer* buffer)
|
|||||||
else if (icmpCode == ICMP_CODE_HOST_UNREACH)
|
else if (icmpCode == ICMP_CODE_HOST_UNREACH)
|
||||||
error = EHOSTUNREACH;
|
error = EHOSTUNREACH;
|
||||||
else if (icmpCode == ICMP_CODE_SOURCE_ROUTE_FAIL)
|
else if (icmpCode == ICMP_CODE_SOURCE_ROUTE_FAIL)
|
||||||
error = EOPNOTSUPP;
|
error = B_NOT_SUPPORTED;
|
||||||
else if (icmpCode == ICMP_CODE_PROTO_UNREACH)
|
else if (icmpCode == ICMP_CODE_PROTO_UNREACH)
|
||||||
error = ENOPROTOOPT;
|
error = ENOPROTOOPT;
|
||||||
else if (icmpCode == ICMP_CODE_PORT_UNREACH)
|
else if (icmpCode == ICMP_CODE_PORT_UNREACH)
|
||||||
@@ -1258,7 +1258,7 @@ udp_error_received(uint32 code, net_buffer* buffer)
|
|||||||
else if (icmpCode == ICMP_CODE_FRAG_NEEDED)
|
else if (icmpCode == ICMP_CODE_FRAG_NEEDED)
|
||||||
error = EMSGSIZE;
|
error = EMSGSIZE;
|
||||||
else
|
else
|
||||||
error = EOPNOTSUPP;
|
error = B_NOT_SUPPORTED;
|
||||||
break;
|
break;
|
||||||
case ICMP_TYPE_TIME_EXCEEDED:
|
case ICMP_TYPE_TIME_EXCEEDED:
|
||||||
error = EHOSTUNREACH;
|
error = EHOSTUNREACH;
|
||||||
|
|||||||
@@ -235,14 +235,14 @@ link_free(net_protocol* protocol)
|
|||||||
status_t
|
status_t
|
||||||
link_connect(net_protocol* protocol, const struct sockaddr* address)
|
link_connect(net_protocol* protocol, const struct sockaddr* address)
|
||||||
{
|
{
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
link_accept(net_protocol* protocol, struct net_socket** _acceptedSocket)
|
link_accept(net_protocol* protocol, struct net_socket** _acceptedSocket)
|
||||||
{
|
{
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -420,14 +420,14 @@ link_unbind(net_protocol* protocol, struct sockaddr* address)
|
|||||||
status_t
|
status_t
|
||||||
link_listen(net_protocol* protocol, int count)
|
link_listen(net_protocol* protocol, int count)
|
||||||
{
|
{
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
link_shutdown(net_protocol* protocol, int direction)
|
link_shutdown(net_protocol* protocol, int direction)
|
||||||
{
|
{
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ add_ancillary_data(net_socket* socket, ancillary_data_container* container,
|
|||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
if (socket->first_info->add_ancillary_data == NULL)
|
if (socket->first_info->add_ancillary_data == NULL)
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
|
|
||||||
status_t status = socket->first_info->add_ancillary_data(
|
status_t status = socket->first_info->add_ancillary_data(
|
||||||
socket->first_protocol, container, header);
|
socket->first_protocol, container, header);
|
||||||
@@ -238,7 +238,7 @@ process_ancillary_data(net_socket* socket, ancillary_data_container* container,
|
|||||||
|
|
||||||
while ((data = next_ancillary_data(container, data, &header)) != NULL) {
|
while ((data = next_ancillary_data(container, data, &header)) != NULL) {
|
||||||
if (socket->first_info->process_ancillary_data == NULL)
|
if (socket->first_info->process_ancillary_data == NULL)
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
|
|
||||||
ssize_t bytesWritten = socket->first_info->process_ancillary_data(
|
ssize_t bytesWritten = socket->first_info->process_ancillary_data(
|
||||||
socket->first_protocol, &header, data, dataBuffer, dataBufferLen);
|
socket->first_protocol, &header, data, dataBuffer, dataBufferLen);
|
||||||
@@ -268,7 +268,7 @@ process_ancillary_data(net_socket* socket,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (socket->first_info->process_ancillary_data_no_container == NULL)
|
if (socket->first_info->process_ancillary_data_no_container == NULL)
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
|
|
||||||
bytesWritten = socket->first_info->process_ancillary_data_no_container(
|
bytesWritten = socket->first_info->process_ancillary_data_no_container(
|
||||||
socket->first_protocol, buffer, dataBuffer,
|
socket->first_protocol, buffer, dataBuffer,
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ compat_control(void *cookie, uint32 op, void *arg, size_t length)
|
|||||||
struct sockaddr_dl address;
|
struct sockaddr_dl address;
|
||||||
|
|
||||||
if ((ifp->if_flags & IFF_MULTICAST) == 0)
|
if ((ifp->if_flags & IFF_MULTICAST) == 0)
|
||||||
return EOPNOTSUPP;
|
return B_NOT_SUPPORTED;
|
||||||
|
|
||||||
memset(&address, 0, sizeof(address));
|
memset(&address, 0, sizeof(address));
|
||||||
address.sdl_family = AF_LINK;
|
address.sdl_family = AF_LINK;
|
||||||
@@ -262,11 +262,11 @@ compat_control(void *cookie, uint32 op, void *arg, size_t length)
|
|||||||
return status;
|
return status;
|
||||||
|
|
||||||
state.media = mediareq.ifm_active;
|
state.media = mediareq.ifm_active;
|
||||||
if (mediareq.ifm_status & IFM_ACTIVE)
|
if ((mediareq.ifm_status & IFM_ACTIVE) != 0)
|
||||||
state.media |= IFM_ACTIVE;
|
state.media |= IFM_ACTIVE;
|
||||||
if (mediareq.ifm_active & IFM_10_T)
|
if ((mediareq.ifm_active & IFM_10_T) != 0)
|
||||||
state.speed = 10000;
|
state.speed = 10000;
|
||||||
else if (mediareq.ifm_active & IFM_100_TX)
|
else if ((mediareq.ifm_active & IFM_100_TX) != 0)
|
||||||
state.speed = 100000;
|
state.speed = 100000;
|
||||||
else
|
else
|
||||||
state.speed = 1000000;
|
state.speed = 1000000;
|
||||||
|
|||||||
Reference in New Issue
Block a user