Ingo Schwarze <[email protected]> wrote:

> +.Pp
> +The driver of the device that is being read from
> +may return additional errors.
> +Such device-specific errors may be documented
> +in the section 4 manual pages of the respective drivers.

I'm unhappy with the wording "the driver of the device".  It is overly
precise and inaccurate.  Additional errors may come from drivers, but
also from subsystems like netinet, net, scsi, etc.  So neither driver
nor device applies -- additional errors can percolate upwards from a
vast list of underlying code.

I also worry that programmers won't know what action to take for
specific errors.  Some may feel they must expect all error values and
handle them in different ways (some to be ignored, others as fatal).
What is the correct strategy for handling potentially arbitrary errors?
This text is leading pepole to expect anything, that this is the new
normal, and it is worrisome.

It is sad that so many extra errnos have been exposed over the years.

Many low-level errors should have been abstracted into existing
higher-level catagories, if the effect and disposition are the same, then
map the internal condition to the same errno.

Or the low-level error should not exist in the first place, the lower
level code is simply being sloppy, and the abstraction is incomplete.


Reply via email to