From 9c8f170d4a65a029f0d8ab32afd1a034a8de4250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20M=C3=A4kisara?= Date: Thu, 28 Nov 2024 19:54:54 +0200 Subject: [PATCH] mt: Complain about write protection if write protected MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Print the message if status bit is one, not zero. Signed-off-by: Kai Mäkisara --- mt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mt.c b/mt.c index e963e0f..151a2e1 100644 --- a/mt.c +++ b/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"); }