* errno.cc (errmap): Map ERROR_BEGINNING_OF_MEDIA and
ERROR_SETMARK_DETECTED to EIO instead of ESPIPE. Handle ERROR_FILEMARK_DETECTED. * fhandler_tape.cc (TAPE_FUNC): Add comment that ERROR_BUS_RESET has still to be handled correctly. (fhandler_dev_tape::open): Accomodate fact that get.mt_dsreg also contains density code. (fhandler_dev_tape::ioctl): Rearrange slightly. Reset devbuf also on MTNOP, MTWSM, MTSETBLK, MTSETDRVBUFFER, MTSETPART and MTMKPART. (fhandler_dev_tape::tape_set_pos): Rearrange. Match behaviour to the Linux tape driver. (fhandler_dev_tape::tape_status): Call IOCTL_STORAGE_GET_MEDIA_TYPES_EX if available. Return device type and density code in appropriate mtget members. * wincap.h (wincaps::has_ioctl_storage_get_media_types_ex): New element. * wincap.cc: Implement above element throughout. * include/cygwin/mtio.h: Add tape device types as returned by IOCTL_STORAGE_GET_MEDIA_TYPES_EX. (MT_TAPE_INFO): Use above type codes. (struct mtget): Change mt_dsreg comment.
This commit is contained in:
@@ -102,8 +102,8 @@ static NO_COPY struct
|
||||
X (NOT_OWNER, EPERM),
|
||||
X (END_OF_MEDIA, ENOSPC),
|
||||
X (EOM_OVERFLOW, ENOSPC),
|
||||
X (BEGINNING_OF_MEDIA, ESPIPE),
|
||||
X (SETMARK_DETECTED, ESPIPE),
|
||||
X (BEGINNING_OF_MEDIA, EIO),
|
||||
X (SETMARK_DETECTED, EIO),
|
||||
X (NO_DATA_DETECTED, ENOSPC),
|
||||
X (POSSIBLE_DEADLOCK, EDEADLOCK),
|
||||
X (CRC, EIO),
|
||||
@@ -115,6 +115,7 @@ static NO_COPY struct
|
||||
X (INVALID_ADDRESS, EOVERFLOW),
|
||||
X (INVALID_BLOCK_LENGTH, EIO),
|
||||
X (BUS_RESET, EIO),
|
||||
X (FILEMARK_DETECTED, EIO),
|
||||
{ 0, NULL, 0}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user