Write error codes

The following codes and their descriptions apply to write operations.
[EINVAL]
The operation that is requested has invalid parameters or an invalid combination of parameters.

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

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

[ENOSPC]
A write operation failed because it reached the early warning mark or the programmable early warning zone (PEWZ) while it was in label-processing mode. This return code is returned only once when the early warning or the programmable early warning zone (PEWZ) is reached.
[ENXIO]
A write operation was attempted after the device reached the logical end of the medium.
[EWRPROTECT]
A write operation was attempted on a write-protected tape.
[EIO]
The physical end of the medium was detected, or a general error occurred that indicates a failure to write to the device. Perform the failure analysis.