mirror of
https://github.com/iustin/mt-st.git
synced 2026-04-26 22:35:05 +00:00
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:
2
mt.c
2
mt.c
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user