Messages in this thread | | | Subject | Re: funny inconsistency in error returns | From | Andreas Schwab <> | Date | 22 Feb 1999 12:00:25 +0100 |
| |
Andries.Brouwer@cwi.nl writes:
|> I see ENXIO upon open("/dev/hdd"), and ENODEV upon open("/dev/hde"); |> It is clear why this happens |> (hde has major 33, and blkdev_open does not know it and returns -ENODEV; |> hdd has major 22, known since hdc exists, and ide_open returns -ENXIO). |> Both error numbers are OK, but the inconsistency is a microscopic flaw. |> Maybe ide_open() should also return ENODEV.
I think both should be using ENXIO. From the glibc docs:
- Macro: int ENXIO No such device or address. The system tried to use the device represented by a file you specified, and it couldn't find the device. This can mean that the device file was installed incorrectly, or that the physical device is missing or not correctly attached to the computer.
- Macro: int ENODEV The wrong type of device was given to a function that expects a particular sort of device.
-- Andreas Schwab "And now for something schwab@issan.cs.uni-dortmund.de completely different" schwab@gnu.org
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |