* Replaced ENODEV with B_DEVICE_NOT_FOUND.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37803 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
f7e1c6f154
commit
d72a2493e6
@ -957,7 +957,7 @@ ipv4_delta_membership(ipv4_protocol* protocol, int option,
|
||||
}
|
||||
|
||||
if (interface == NULL)
|
||||
return ENODEV;
|
||||
return B_DEVICE_NOT_FOUND;
|
||||
|
||||
return ipv4_delta_membership(protocol, option, interface,
|
||||
groupAddr, sourceAddr);
|
||||
@ -983,7 +983,7 @@ ipv4_generic_delta_membership(ipv4_protocol* protocol, int option,
|
||||
interface = sDatalinkModule->get_interface(sDomain, index);
|
||||
|
||||
if (interface == NULL)
|
||||
return ENODEV;
|
||||
return B_DEVICE_NOT_FOUND;
|
||||
|
||||
const in_addr* sourceAddr = NULL;
|
||||
if (_sourceAddr != NULL)
|
||||
|
@ -411,7 +411,7 @@ ipv6_delta_membership(ipv6_protocol* protocol, int option,
|
||||
interface = sDatalinkModule->get_interface(sDomain, interfaceIndex);
|
||||
|
||||
if (interface == NULL)
|
||||
return ENODEV;
|
||||
return B_DEVICE_NOT_FOUND;
|
||||
|
||||
return ipv6_delta_membership(protocol, option, interface,
|
||||
groupAddr, sourceAddr);
|
||||
|
@ -531,7 +531,7 @@ unregister_device_deframer(net_device* device)
|
||||
// find device interface for this device
|
||||
net_device_interface* interface = find_device_interface(device->name);
|
||||
if (interface == NULL)
|
||||
return ENODEV;
|
||||
return B_DEVICE_NOT_FOUND;
|
||||
|
||||
RecursiveLocker _(interface->receive_lock);
|
||||
|
||||
@ -557,7 +557,7 @@ register_device_deframer(net_device* device, net_deframe_func deframeFunc)
|
||||
// find device interface for this device
|
||||
net_device_interface* interface = find_device_interface(device->name);
|
||||
if (interface == NULL)
|
||||
return ENODEV;
|
||||
return B_DEVICE_NOT_FOUND;
|
||||
|
||||
RecursiveLocker _(interface->receive_lock);
|
||||
|
||||
@ -595,7 +595,7 @@ register_device_handler(struct net_device* device, int32 type,
|
||||
// find device interface for this device
|
||||
net_device_interface* interface = find_device_interface(device->name);
|
||||
if (interface == NULL)
|
||||
return ENODEV;
|
||||
return B_DEVICE_NOT_FOUND;
|
||||
|
||||
RecursiveLocker _(interface->receive_lock);
|
||||
|
||||
@ -631,7 +631,7 @@ unregister_device_handler(struct net_device* device, int32 type)
|
||||
// find device interface for this device
|
||||
net_device_interface* interface = find_device_interface(device->name);
|
||||
if (interface == NULL)
|
||||
return ENODEV;
|
||||
return B_DEVICE_NOT_FOUND;
|
||||
|
||||
RecursiveLocker _(interface->receive_lock);
|
||||
|
||||
@ -664,7 +664,7 @@ register_device_monitor(net_device* device, net_device_monitor* monitor)
|
||||
// find device interface for this device
|
||||
net_device_interface* interface = find_device_interface(device->name);
|
||||
if (interface == NULL)
|
||||
return ENODEV;
|
||||
return B_DEVICE_NOT_FOUND;
|
||||
|
||||
RecursiveLocker _(interface->receive_lock);
|
||||
interface->monitor_funcs.Add(monitor);
|
||||
@ -681,7 +681,7 @@ unregister_device_monitor(net_device* device, net_device_monitor* monitor)
|
||||
// find device interface for this device
|
||||
net_device_interface* interface = find_device_interface(device->name);
|
||||
if (interface == NULL)
|
||||
return ENODEV;
|
||||
return B_DEVICE_NOT_FOUND;
|
||||
|
||||
RecursiveLocker _(interface->receive_lock);
|
||||
|
||||
@ -723,7 +723,7 @@ device_removed(net_device* device)
|
||||
// so our put_() will (eventually) do the final cleanup
|
||||
net_device_interface* interface = get_device_interface(device->name, false);
|
||||
if (interface == NULL)
|
||||
return ENODEV;
|
||||
return B_DEVICE_NOT_FOUND;
|
||||
|
||||
// Propagate the loss of the device throughout the stack.
|
||||
// This is very complex, refer to remove_interface() for
|
||||
@ -753,7 +753,7 @@ device_enqueue_buffer(net_device* device, net_buffer* buffer)
|
||||
{
|
||||
net_device_interface* interface = get_device_interface(device->index);
|
||||
if (interface == NULL)
|
||||
return ENODEV;
|
||||
return B_DEVICE_NOT_FOUND;
|
||||
|
||||
status_t status = fifo_enqueue_buffer(&interface->receive_queue, buffer);
|
||||
|
||||
|
@ -97,7 +97,7 @@ LinkProtocol::StartMonitoring(const char* deviceName)
|
||||
|
||||
net_device_interface* interface = get_device_interface(deviceName);
|
||||
if (interface == NULL)
|
||||
return ENODEV;
|
||||
return B_DEVICE_NOT_FOUND;
|
||||
|
||||
status_t status = register_device_monitor(interface->device, &fMonitor);
|
||||
if (status < B_OK) {
|
||||
@ -124,7 +124,7 @@ status_t
|
||||
LinkProtocol::SocketStatus(bool peek) const
|
||||
{
|
||||
if (fMonitoredDevice == NULL)
|
||||
return ENODEV;
|
||||
return B_DEVICE_NOT_FOUND;
|
||||
|
||||
return LocalDatagramSocket::SocketStatus(peek);
|
||||
}
|
||||
@ -163,7 +163,7 @@ LinkProtocol::_MonitorEvent(net_device_monitor* monitor, int32 event)
|
||||
protocol->_Unregister();
|
||||
if (protocol->IsEmpty()) {
|
||||
protocol->WakeAll();
|
||||
notify_socket(protocol->socket, B_SELECT_READ, ENODEV);
|
||||
notify_socket(protocol->socket, B_SELECT_READ, B_DEVICE_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -276,7 +276,7 @@ link_control(net_protocol* _protocol, int level, int option, void* value,
|
||||
net_device_interface* interface
|
||||
= get_device_interface(request.ifr_index);
|
||||
if (interface == NULL)
|
||||
return ENODEV;
|
||||
return B_DEVICE_NOT_FOUND;
|
||||
|
||||
strlcpy(request.ifr_name, interface->device->name, IF_NAMESIZE);
|
||||
put_device_interface(interface);
|
||||
@ -317,7 +317,7 @@ link_control(net_protocol* _protocol, int level, int option, void* value,
|
||||
return B_BAD_ADDRESS;
|
||||
|
||||
if (interface == NULL)
|
||||
return ENODEV;
|
||||
return B_DEVICE_NOT_FOUND;
|
||||
|
||||
get_device_interface_address(interface, &request.ifr_addr);
|
||||
put_device_interface(interface);
|
||||
@ -335,7 +335,7 @@ link_control(net_protocol* _protocol, int level, int option, void* value,
|
||||
return B_BAD_ADDRESS;
|
||||
|
||||
if (interface == NULL)
|
||||
return ENODEV;
|
||||
return B_DEVICE_NOT_FOUND;
|
||||
|
||||
request.ifr_flags = interface->device->flags;
|
||||
put_device_interface(interface);
|
||||
|
Loading…
Reference in New Issue
Block a user