EOM handling fix

Test for EOM before attempting to write block and return error code.

Previous behaviour was wrong in that an extra block of data was being
written.

Signed-off-by: Mark Harvey <markh794@gmail.com>
Simplify 'remaining capacity' calculation

Simplicy calculation of 'remaining capacity' following successful
writeBlock.

Signed-off-by: Mark Harvey <markh794@gmail.com>
Fix return data from TAPE CAPACITY log page

Byte-swap issue with data returned from TAPE CAPACITY log page.

Signed-off-by: jean-michel Drean <jean-michel.drean@active-circle.com>
Signed-off-by: Mark Harvey <markh794@gmail.com>