summaryrefslogtreecommitdiff
path: root/pfinet/ethernet.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2012-02-19 17:00:53 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2012-02-19 17:00:53 +0100
commitc4486d3563a4e3dfb1934252c1261d74965075c7 (patch)
tree3366e3e6387bcd5f4ef0933c838ae124c4dfaef1 /pfinet/ethernet.c
parentb3305ae85e2120acb95d45939b6808aca0221d1b (diff)
Fix pfinet device_open errno reporting
* pfinet/ethernet.c (ethernet_open): Use value saved in `file_errno', not `errno'.
Diffstat (limited to 'pfinet/ethernet.c')
-rw-r--r--pfinet/ethernet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pfinet/ethernet.c b/pfinet/ethernet.c
index 745a0e1d..0fd76706 100644
--- a/pfinet/ethernet.c
+++ b/pfinet/ethernet.c
@@ -203,14 +203,14 @@ ethernet_open (struct device *dev)
err = get_privileged_ports (0, &master_device);
if (err)
{
- error (0, errno, "file_name_lookup %s", dev->name);
+ error (0, file_errno, "file_name_lookup %s", dev->name);
error (2, err, "and cannot get device master port");
}
err = device_open (master_device, D_WRITE | D_READ, dev->name, &edev->ether_port);
mach_port_deallocate (mach_task_self (), master_device);
if (err)
{
- error (0, errno, "file_name_lookup %s", dev->name);
+ error (0, file_errno, "file_name_lookup %s", dev->name);
error (2, err, "device_open(%s)", dev->name);
}