Imported Upstream version 2.6.0p2
[debian/amanda] / device-src / tape-uware.c
index 4f216161db3dad4f585cf4d623037bf743d69acc..0b86761ec5c9c56ce925a12e77540030afc95289 100644 (file)
@@ -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;
     }
 }