many others, a complete list can be found in the file AUTHORS.
This program is Free Software; you can redistribute it and/or
modify it under the terms of version two of the GNU General Public
- License as published by the Free Software Foundation plus additions
- that are listed in the file LICENSE.
+ License as published by the Free Software Foundation and included
+ in the file LICENSE.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
return true;
}
-void DEVICE::block(int why)
-{
- r_dlock(); /* need recursive lock to block */
- block_device(this, why);
- r_dunlock();
-}
-
-void DEVICE::unblock(bool locked)
-{
- if (!locked) {
- dlock();
- }
- unblock_device(this);
- dunlock();
-}
-
-
-const char *DEVICE::print_blocked() const
-{
- switch (m_blocked) {
- case BST_NOT_BLOCKED:
- return "BST_NOT_BLOCKED";
- case BST_UNMOUNTED:
- return "BST_UNMOUNTED";
- case BST_WAITING_FOR_SYSOP:
- return "BST_WAITING_FOR_SYSOP";
- case BST_DOING_ACQUIRE:
- return "BST_DOING_ACQUIRE";
- case BST_WRITING_LABEL:
- return "BST_WRITING_LABEL";
- case BST_UNMOUNTED_WAITING_FOR_SYSOP:
- return "BST_UNMOUNTED_WAITING_FOR_SYSOP";
- case BST_MOUNT:
- return "BST_MOUNT";
- default:
- return _("unknown blocked code");
- }
-}
/*
* Called to indicate that we have just read an
*/
void DEVICE::clear_volhdr()
{
- /* If we have an unused volume associated with this drive, free it */
- if (vol && !is_busy()) {
- free_volume(this);
- }
Dmsg1(100, "Clear volhdr vol=%s\n", VolHdr.VolumeName);
memset(&VolHdr, 0, sizeof(VolHdr));
}