Re: [PATCH] error value for opening block devices

From: Randy.Dunlap
Date: Sun Mar 21 2004 - 23:01:52 EST


On Sat, 20 Mar 2004 02:13:47 -0800 Ulrich Drepper wrote:

| Opening a non-existing block device currently yields an ENXIO error.
| Doing the same for char devices produces the correct error ENODEV.
|
| The attached patch fixes the symptoms. Somebody with more knowledge
| will have to decide whether there are any negative side effects.

(now that this is merged...)

Isn't this going in the wrong direction, or am I just
mis-interpreting SUSv3?

Compare LSB bugzilla #115:
http://bugs.linuxbase.org/show_bug.cgi?id=115

open - open a file

...

ERRORS

[ENXIO]
O_NONBLOCK is set, the named file is a FIFO, O_WRONLY is set, and
no process has the file open for reading.

[ENXIO]
The named file is a character special or block special file, and
the device associated with this special file does not exist.


(Note: ENODEV is not listed as a possible return value.)

--
~Randy
"You can't do anything without having to do something else first."
-- Belefant's Law
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/