Attila,
Try the attached patch.
Jean-Louis
On 01/03/2013 10:44 AM, Attila Bogár wrote:
On Tue, 02 Oct 2012 10:20:22 -0400
Jean-Louis Martineau <[email protected]> wrote:
On 10/02/2012 10:10 AM, Jean-Louis Martineau wrote:
The attached patch fix amstatus and amdump to report that the tape is
write protected.
I mean amcheck and amdump.
I do not have a tape drive on hand so I can't test it. I appreciate if
someone can test it.
Sorry it took some time until I got round to this patch.
I tested the patch against 3.3.1.svn.4677 and it works.
The only problem I see, is that amcheck exit status is 0 and not 1 when the
tape is write-protected.
HNY,
Attila
diff --git a/server-src/amcheck-device.pl b/server-src/amcheck-device.pl
index 599476a..e05bef6 100644
--- a/server-src/amcheck-device.pl
+++ b/server-src/amcheck-device.pl
@@ -233,6 +233,7 @@ sub do_check {
if($res->{'device'} and !$res->{'device'}->check_writable()) {
print "ERROR: " . $res->{'device'}->error_or_status() . "\n";
+ $exit_status = 1;
return $steps->{'release'}->();
}
$steps->{'check_overwrite'}->();