Lines Matching refs:tape

44 static uint_t writesize;	/* size of malloc()ed buffer for tape */
45 static ino_t inos[TP_NINOS]; /* starting inodes on each tape */
56 * the slaves. The tape writer passes out the current inode,
57 * offset, and number of tape records written after completing a volume.
78 short tflag; /* begin new tape */
100 ino_t sl_inos; /* inos, if this record starts tape */
103 int sl_tapea; /* header number, if starting tape */
104 int sl_firstrec; /* number of first block on tape */
143 static int writer = -1; /* fd of tape writer */
144 static pid_t writepid; /* pid of tape writer */
208 * allocated on page boundaries for tape write() efficiency.
329 * Reset tape state variables -- called
392 * the front of the tape (the "archive" file)
729 msg(gettext("Write error on %s\n"), tape);
744 msg(gettext("This tape will rewind. After "
745 "it is rewound,\nreplace the faulty tape "
758 "This tape will be rewritten and then verified\n"));
768 * when it was being dumped. The tape writer process sends checkpoint
1039 if (strchr(tape, ':')) {
1044 host = tape;
1045 tape = strchr(host, ':');
1046 *tape++ = 0;
1069 dumpdev = xmalloc((size_t)((sizeof (spcl.c_host) + strlen(tape) + 2)));
1071 (void) sprintf(dumpdev, "%.*s:%s", (int)sizeof (spcl.c_host), cp, tape);
1079 * Gross hack due to misfeature of mt tape driver that causes
1081 * whether tape is rewind device or not -- for local devices
1094 c = strrchr(tape, '/');
1096 c = tape;
1105 else if ((strstr(tape, "mt") || strstr(tape, "st")) &&
1106 sscanf(tape, "%*[a-zA-Z/]%d", &unit) == 1 &&
1115 tape);
1153 * Space to the end of the tape.
1172 * Guess whether the tape is rewinding so we can tell
1176 /* tape is probably rewinding */
1220 /* tape is probably rewinding */
1265 msg(gettext("Cannot connect to tape host `%s'\n"), cp);
1300 * Wait for the tape to autoload. Note that the delay
1307 if (rmtopen(tape, O_RDONLY) >= 0) {
1314 m = (access(tape, F_OK) == 0) ? 0 : O_CREAT;
1316 safe_device_open(tape, O_RDONLY, 0600) :
1317 safe_device_open(tape, O_RDONLY|m, 0600))
1365 * We implement taking and restoring checkpoints on the tape level.
1366 * When each tape is opened, a new process is created by forking; this
1369 * If the child returns X_REWRITE, then it had problems writing that tape;
1533 while ((to = host ? rmtopen(tape, O_RDONLY) :
1535 safe_device_open(tape, O_RDONLY, 0600)) < 0) {
1536 perror(tape);
1551 * If we're using the non-rewinding tape device,
1552 * the tape will be left positioned after the
1554 * of this tape file (cross two tape marks in the
1575 * XXX Add logic to test for "tape" being a
1579 * This can be bad if tape == "/etc/passwd".
1585 * The tape is rewinding;
1589 "Cannot position tape using rewind device!\n"));
1597 while ((to = host ? rmtopen(tape, O_WRONLY) :
1598 safe_device_open(tape, O_WRONLY, 0600)) < 0)
1605 m = (access(tape, F_OK) == 0) ? 0 : O_CREAT;
1607 * Only verify the tape label if label
1613 rmtopen(tape, O_WRONLY) :
1614 safe_device_open(tape, O_WRONLY|m, 0600))
1626 * Make sure the tape is positioned
1632 "Warning - tape positioning error!\n\
1634 tape, mt.mt_fileno+1, filenum);
1639 tapeno++; /* current tape sequence */
1646 enslave(); /* Share tape buffers with slaves */
2001 static int count; /* tape blocks written since last spclrec */
2023 struct bdesc *bp = bufp; /* current buf in tape block */
2024 struct bdesc *begin = bufp; /* first buf of tape block */
2025 struct bdesc *end = bufp + (ntrec-1); /* last buf of tape block */
2029 /* ...written on current tape */
2031 char *recmap = spcl.c_addr; /* current tape record map */
2051 /* START: wait until all buffers in tape block are full */
2073 /* END: wait until all buffers in tape block are full */
2109 "Verification error %ld feet into tape %d\n"),
2128 "Write error %ld feet into tape %d\n"),
2204 * Check for end of tape
2209 msg(gettext("End-of-tape detected\n"));
2252 * the last written to tape is a special record, use
2399 char *fail = strdup(gettext("Cannot position tape to file %d\n"));
2404 m = (access(tape, F_OK) == 0) ? 0 : O_CREAT;
2407 * To avoid writing tape marks at inappropriate places, we open the
2410 while ((to = host ? rmtopen(tape, O_RDONLY) :
2411 safe_device_open(tape, O_RDONLY|m, 0600)) < 0) {