]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/dev.c
ebl Fix a bug in read_close_session which return random status
[bacula/bacula] / bacula / src / stored / dev.c
index 77f6cfd62d09f0c3869771c1a34ed44a187951b1..2e2f39088bf03d150995b1ba22e9156650b305dc 100644 (file)
  *     daemon. More complicated coding (double buffering, writer
  *     thread, ...) is left for a later version.
  *
- *     Unfortunately, I have had to add more and more complication
- *     to this code. This was not foreseen as noted above, and as
- *     a consequence has lead to something more contorted than is
- *     really necessary -- KES.  Note, this contortion has been
- *     corrected to a large extent by a rewrite (Apr MMI).
- *
  *   Version $Id$
  */
 
@@ -781,44 +775,6 @@ bool DEVICE::rewind(DCR *dcr)
    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