]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/dev.c
Simplify two messages in acquire.c
[bacula/bacula] / bacula / src / stored / dev.c
index 11a9cd3fd3b8c512b71c754598a57c065b294bb7..86799f5f538fb98f41543f258f7f6c685c0a6f2d 100644 (file)
@@ -146,8 +146,6 @@ init_dev(DEVICE *dev, DEVRES *device)
    dev->capabilities = device->cap_bits;
    dev->min_block_size = device->min_block_size;
    dev->max_block_size = device->max_block_size;
-   dev->max_volume_jobs = device->max_volume_jobs;
-   dev->max_volume_files = device->max_volume_files;
    dev->max_volume_size = device->max_volume_size;
    dev->max_file_size = device->max_file_size;
    dev->volume_capacity = device->volume_capacity;
@@ -260,7 +258,7 @@ open_dev(DEVICE *dev, char *VolName, int mode)
         }
         if (errno == EBUSY && timeout-- > 0) {
             Dmsg2(100, "Device %s busy. ERR=%s\n", dev->dev_name, strerror(errno));
-           sleep(1);
+           bmicrosleep(1, 0);
            continue;
         }
         dev->dev_errno = errno;
@@ -288,7 +286,7 @@ open_dev(DEVICE *dev, char *VolName, int mode)
       Dmsg1(29, "open_dev: tape %d opened\n", dev->fd);
    } else {
       /*
-       * Handle opening of file
+       * Handle opening of File Archive (not a tape)
        */
       archive_name = get_pool_memory(PM_FNAME);
       pm_strcpy(&archive_name, dev->dev_name);
@@ -359,7 +357,7 @@ int rewind_dev(DEVICE *dev)
            clrerror_dev(dev, MTREW);
            if (dev->dev_errno == EIO && i > 0) {
                Dmsg0(200, "Sleeping 5 seconds.\n");
-              sleep(5);
+              bmicrosleep(5, 0);
               continue;
            }
             Mmsg2(&dev->errmsg, _("Rewind error on %s. ERR=%s.\n"),
@@ -487,7 +485,7 @@ int update_pos_dev(DEVICE *dev)
       dev->file_addr = 0;
       pos = lseek(dev->fd, (off_t)0, SEEK_CUR);
       if (pos < 0) {
-         Dmsg1(000, "Seek error: ERR=%s\n", strerror(dev->dev_errno));
+         Pmsg1(000, "Seek error: ERR=%s\n", strerror(dev->dev_errno));
         dev->dev_errno = errno;
          Mmsg2(&dev->errmsg, _("lseek error on %s. ERR=%s.\n"),
            dev->dev_name, strerror(dev->dev_errno));