Read error codes

The following codes and their descriptions apply to read operations.
[EBADF]
A read operation was attempted on a device opened with the O_WRONLY flag.
[EINVAL]
The operation that is requested has invalid parameters or an invalid combination of parameters.

The number of bytes requested in the read operation was not a multiple of the block size for a fixed block transfer.

The number of bytes requested in the read operation was greater than the maximum size allowed by the device for variable block transfers.

[ENOMEM]
The number of bytes requested in the read operation of a variable block record was less than the size of the block. This error is known as an overlength condition.