* 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:
parent
576be63409
commit
ca215dfe68
@ -54,7 +54,7 @@ update_link_state(ethernet_device *device, bool notify = true)
|
||||
if (ioctl(device->fd, ETHER_GET_LINK_STATE, &state,
|
||||
sizeof(ether_link_state)) < 0) {
|
||||
// This device does not support retrieving the link
|
||||
return EOPNOTSUPP;
|
||||
return B_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
state.media |= IFM_ETHER;
|
||||
@ -367,7 +367,7 @@ ethernet_set_promiscuous(net_device *_device, bool promiscuous)
|
||||
|
||||
int32 value = (int32)promiscuous;
|
||||
if (ioctl(device->fd, ETHER_SETPROMISC, &value, sizeof(value)) < 0)
|
||||
return EOPNOTSUPP;
|
||||
return B_NOT_SUPPORTED;
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
@ -376,7 +376,7 @@ ethernet_set_promiscuous(net_device *_device, bool promiscuous)
|
||||
status_t
|
||||
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
|
||||
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
|
||||
icmp_listen(net_protocol* protocol, int count)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
return B_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
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
|
||||
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:
|
||||
// ``An error of EOPNOTSUPP is returned if these options are
|
||||
// used with getsockopt().''
|
||||
return EOPNOTSUPP;
|
||||
return B_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
dprintf("IPv4::getsockopt(): get unknown option: %d\n", option);
|
||||
@ -1329,14 +1329,14 @@ ipv4_unbind(net_protocol* protocol, struct sockaddr* address)
|
||||
status_t
|
||||
ipv4_listen(net_protocol* protocol, int count)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
return B_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
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
|
||||
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
|
||||
udp_listen(net_protocol *protocol, int count)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
return B_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
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)
|
||||
error = EHOSTUNREACH;
|
||||
else if (icmpCode == ICMP_CODE_SOURCE_ROUTE_FAIL)
|
||||
error = EOPNOTSUPP;
|
||||
error = B_NOT_SUPPORTED;
|
||||
else if (icmpCode == ICMP_CODE_PROTO_UNREACH)
|
||||
error = ENOPROTOOPT;
|
||||
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)
|
||||
error = EMSGSIZE;
|
||||
else
|
||||
error = EOPNOTSUPP;
|
||||
error = B_NOT_SUPPORTED;
|
||||
break;
|
||||
case ICMP_TYPE_TIME_EXCEEDED:
|
||||
error = EHOSTUNREACH;
|
||||
|
@ -235,14 +235,14 @@ link_free(net_protocol* protocol)
|
||||
status_t
|
||||
link_connect(net_protocol* protocol, const struct sockaddr* address)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
return B_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
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
|
||||
link_listen(net_protocol* protocol, int count)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
return B_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
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;
|
||||
|
||||
if (socket->first_info->add_ancillary_data == NULL)
|
||||
return EOPNOTSUPP;
|
||||
return B_NOT_SUPPORTED;
|
||||
|
||||
status_t status = socket->first_info->add_ancillary_data(
|
||||
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) {
|
||||
if (socket->first_info->process_ancillary_data == NULL)
|
||||
return EOPNOTSUPP;
|
||||
return B_NOT_SUPPORTED;
|
||||
|
||||
ssize_t bytesWritten = socket->first_info->process_ancillary_data(
|
||||
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)
|
||||
return EOPNOTSUPP;
|
||||
return B_NOT_SUPPORTED;
|
||||
|
||||
bytesWritten = socket->first_info->process_ancillary_data_no_container(
|
||||
socket->first_protocol, buffer, dataBuffer,
|
||||
|
@ -235,7 +235,7 @@ compat_control(void *cookie, uint32 op, void *arg, size_t length)
|
||||
struct sockaddr_dl address;
|
||||
|
||||
if ((ifp->if_flags & IFF_MULTICAST) == 0)
|
||||
return EOPNOTSUPP;
|
||||
return B_NOT_SUPPORTED;
|
||||
|
||||
memset(&address, 0, sizeof(address));
|
||||
address.sdl_family = AF_LINK;
|
||||
@ -262,11 +262,11 @@ compat_control(void *cookie, uint32 op, void *arg, size_t length)
|
||||
return status;
|
||||
|
||||
state.media = mediareq.ifm_active;
|
||||
if (mediareq.ifm_status & IFM_ACTIVE)
|
||||
if ((mediareq.ifm_status & IFM_ACTIVE) != 0)
|
||||
state.media |= IFM_ACTIVE;
|
||||
if (mediareq.ifm_active & IFM_10_T)
|
||||
if ((mediareq.ifm_active & IFM_10_T) != 0)
|
||||
state.speed = 10000;
|
||||
else if (mediareq.ifm_active & IFM_100_TX)
|
||||
else if ((mediareq.ifm_active & IFM_100_TX) != 0)
|
||||
state.speed = 100000;
|
||||
else
|
||||
state.speed = 1000000;
|
||||
|
Loading…
Reference in New Issue
Block a user