mt: Complain about write protection if write protected

Print the message if status bit is one, not zero.

Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
This commit is contained in:
Kai Mäkisara
2024-12-14 18:28:43 +01:00
committed by Iustin Pop
parent 72f9eda87d
commit 9c8f170d4a
+1 -1
View File
@@ -776,6 +776,6 @@ static void test_error(int mtfd, cmdef_tr *cmd)
if ((cmd->error_tests & ET_ONLINE) && !GMT_ONLINE(status.mt_gstat))
fprintf(stderr,
"mt: The device is offline (not powered on, no tape ?).\n");
if ((cmd->error_tests & ET_WPROT) && !GMT_WR_PROT(status.mt_gstat))
if ((cmd->error_tests & ET_WPROT) && GMT_WR_PROT(status.mt_gstat))
fprintf(stderr, "mt: The tape is write-protected.\n");
}