+const char *edit_blocked_reason(DEVICE *dev)
+{
+ switch (dev->dev_blocked) {
+ case BST_NOT_BLOCKED:
+ return "not blocked";
+ case BST_UNMOUNTED:
+ return "user unmounted device";
+ case BST_WAITING_FOR_SYSOP:
+ return "waiting for operator action";
+ case BST_DOING_ACQUIRE:
+ return "opening, validating, or positioning tape";
+ case BST_WRITING_LABEL:
+ return "labeling tape";
+ case BST_UNMOUNTED_WAITING_FOR_SYSOP:
+ return "closed by user during mount request";
+ case BST_MOUNT:
+ return "mount request";
+ default:
+ return "unknown blocked code";
+ }
+}
+
+void _unlock_device(const char *file, int line, DEVICE *dev)