X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=device-src%2Ftape-uware.c;h=0b86761ec5c9c56ce925a12e77540030afc95289;hb=fb2bd066c2f8b34addafe48d62550e3033a59431;hp=4f216161db3dad4f585cf4d623037bf743d69acc;hpb=a6127998ee6dcab6bb034f6ca985b07804a86f9a;p=debian%2Famanda diff --git a/device-src/tape-uware.c b/device-src/tape-uware.c index 4f21616..0b86761 100644 --- a/device-src/tape-uware.c +++ b/device-src/tape-uware.c @@ -83,13 +83,15 @@ gboolean tape_setcompression(int fd, gboolean on) { return 0 == ioctl(fd, T_SETCOMP, cmd); } -TapeCheckResult tape_is_tape_device(int fd) { +ReadLabelStatusFlags tape_is_tape_device(int fd) { /* If we can read block information, it's probably a tape device. */ struct blklen result; if (0 == ioctl(fd, T_RDBLKLEN, &result)) { - return TAPE_CHECK_SUCCESS; + return READ_LABEL_STATUS_SUCCESS; } else { - return TAPE_CHECK_FAILURE; + dbprintf("tape_is_tape_device: ioctl(MTIOCTOP/MTNOP) failed: %s", + strerror(errno)); + return READ_LABEL_STATUS_DEVICE_ERROR; } }