/* 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;
} 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"),
* 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) {
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) {