tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Use consistent errno for read(2) failure on directories
On Fri, Dec 09, 2011 at 09:33:54AM +0100, Nicolas Joly wrote:
> According to the online OpenGroup specification for read(2) available
> at [1], read(2) on directories is implementation dependant. If
> unsupported, it shall fail with EISDIR.
>
> Not all our file systems comply, and return random errno values in
> this case (mostly EINVAL or ENOTSUP).
>
> The attached patch fix some of them (the ones i have access to),
> adjust the man page accordingly and add a small testcase to exercize
> this.
>
> Is it ok to apply ?
Yes, although I'm wondering if maybe it wouldn't be better to insert a
filesystem-independent check and give up on the old ffs behavior.
After all, application writers have had what, 25 years now? to learn
not to do this.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index