X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fstored%2Fansi_label.c;h=02b70cadfddc3eaab45ac7f8653cdbf844e9c09e;hb=22a5d43f2bf48e4d5c056dc17bd7cff90d84290e;hp=28fba900f77e321ece6163257208c2bf4dfaccbe;hpb=65f843b332c5fd751863c6dbbc2028ca46bdf2d6;p=bacula%2Fbacula diff --git a/bacula/src/stored/ansi_label.c b/bacula/src/stored/ansi_label.c index 28fba900f7..02b70cadfd 100644 --- a/bacula/src/stored/ansi_label.c +++ b/bacula/src/stored/ansi_label.c @@ -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) {