]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/ansi_label.c
kes Apply the recycle patch from Richard Mortimer.
[bacula/bacula] / bacula / src / stored / ansi_label.c
index 28fba900f77e321ece6163257208c2bf4dfaccbe..02b70cadfddc3eaab45ac7f8653cdbf844e9c09e 100644 (file)
@@ -74,7 +74,7 @@ int read_ansi_ibm_label(DCR *dcr)
    /* Read a maximum of 5 records VOL1, HDR1, ... HDR4 */
    for (i=0; i < 6; i++) {
       do {
-         stat = read(dev->fd, label, sizeof(label));
+         stat = tape_read(dev->fd, label, sizeof(label));
       } while (stat == -1 && errno == EINTR);
       if (stat < 0) {
          berrno be;
@@ -296,7 +296,7 @@ bool write_ansi_ibm_labels(DCR *dcr, int type, const char *VolName)
          } else {
             label[79] = '3';                /* ANSI label flag */
          }
-         stat = write(dev->fd, label, sizeof(label));
+         stat = tape_write(dev->fd, label, sizeof(label));
          if (stat != sizeof(label)) {
             berrno be;
             Jmsg1(jcr, M_FATAL, 0,  _("Could not write ANSI VOL1 label. ERR=%s\n"),
@@ -328,7 +328,7 @@ bool write_ansi_ibm_labels(DCR *dcr, int type, const char *VolName)
        * This could come at the end of a tape, ignore
        *  EOT errors.
        */
-      stat = write(dev->fd, label, sizeof(label));
+      stat = tape_write(dev->fd, label, sizeof(label));
       if (stat != sizeof(label)) {
          berrno be;
          if (stat == -1) {
@@ -357,7 +357,7 @@ bool write_ansi_ibm_labels(DCR *dcr, int type, const char *VolName)
          label[4] = 'V';
          ascii_to_ebcdic(label, label, sizeof(label));
       }
-      stat = write(dev->fd, label, sizeof(label));
+      stat = tape_write(dev->fd, label, sizeof(label));
       if (stat != sizeof(label)) {
          berrno be;
          if (stat == -1) {