|Summary:||mt - write protect is not reported in status|
|Component:||misc||Assignee:||freebsd-bugs mailing list <bugs>|
|Severity:||Affects Some People|
Description andrew 2016-01-15 20:58:29 UTC
The mt command does not show the "write protect" status of a tape. This would presumably apply to other devices that support write protection, but I cannot test for that. You cannot write to write protected tapes (see BID9933), and get an error if you try - but it is very hard to find the error message if you tar to a write protected tape using a remote login, and if you use a changer remotely, this is seriously hard to debug! So two bugs (possibly feature requests): 1) mt -f /dev/sa0 status # Should report "Write protected" or "Write enabled" as appropriate # I tried to implement this myself, but I think it might be easier for someone else to do it! 2) tar c -f /dev/sa0 file # should write "Error: target is Write protected" to stderr # which presumably requires significant design effort, as both cam and tar # would need changes.