]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/block.c
First cut of restore
[bacula/bacula] / bacula / src / stored / block.c
index 61351ae11774714355f74ea08e1a797a1dc52ee4..7e1de01163587b9f0d78b2a539986457a6e2629d 100644 (file)
@@ -326,12 +326,13 @@ int write_block_to_dev(DEVICE *dev, DEV_BLOCK *block)
       dev->state |= ST_EOF | ST_EOT | ST_WEOT;
       clrerror_dev(dev, -1);
 
-      Dmsg2(0, "=== Write error %d: ERR=%s\n", dev->dev_errno,
-        strerror(dev->dev_errno));
-
       if (dev->dev_errno == 0) {
         dev->dev_errno = ENOSPC;        /* out of space */
       }
+
+      Dmsg2(0, "=== Write error errno=%d: ERR=%s\n", dev->dev_errno,
+        strerror(dev->dev_errno));
+
       Mmsg2(&dev->errmsg, _("Write error on device %s. ERR=%s.\n"), 
         dev->dev_name, strerror(dev->dev_errno));
       block->failed_write = TRUE;