tape
tape = (struct tape *)calloc(DFLT_NTAPE, sizeof (struct tape));
if (tape == NULL || audio == NULL || cd == NULL || fp == NULL)
devlist.tape = NULL;
ntape = expandmem(i, (void **)&tape,
sizeof (struct tape));
tape[i].name = nm;
if (lstat(tape[i].name, &stat) < 0) {
if ((sz = readlink(tape[i].name, linkvalue,
tape[i].device = nm;
cp = strrchr(tape[i].device, '/');
(void) sscanf(cp, "%d", &tape[i].number);
ntape = expandmem(i, (void **)&tape,
sizeof (struct tape));
tape[i].name = nm;
tape[i].device = nm;
(void) sscanf(dep->d_name, "%d", &tape[i].number);
if (strcmp(tape[i].device, tape[j].device))
tape[j].number = -1;
if (tape[j].number != i)
(void) da_add_list(&devlist, tape[j].name, i,
(void) printf("%s", tape[j].name);
for (entry = devlist.tape; entry != NULL; entry = entry->next) {
} *tape;
extern char *tape; /* name of the tape file */
tape = DEFTAPE;
tape = *argv;
if (*tape == '\0') {
if (strcmp(tape, "-") == 0 && verify) {
if (strcmp(tape, "-") == 0) {
if (strcmp(tape, "-") == 0) {
tape = gettext("standard output");
dumpdev = sdumpdev = strdup(tape);
} else if (*tape == '+') {
if (diskette && strcmp(tape, DEFTAPE) == 0)
tape = DISKETTE;
msg(gettext("Cannot re-dump active files to `%s'\n"), tape);
"device `%s'\n"), tape);
"Dumping active files (retry pass %d) to `%s'\n"), passno, tape);
char *tape;
dumpdev = xmalloc((size_t)((sizeof (spcl.c_host) + strlen(tape) + 2)));
(void) sprintf(dumpdev, "%.*s:%s", (int)sizeof (spcl.c_host), cp, tape);
c = strrchr(tape, '/');
c = tape;
else if ((strstr(tape, "mt") || strstr(tape, "st")) &&
sscanf(tape, "%*[a-zA-Z/]%d", &unit) == 1 &&
tape);
if (rmtopen(tape, O_RDONLY) >= 0) {
m = (access(tape, F_OK) == 0) ? 0 : O_CREAT;
safe_device_open(tape, O_RDONLY, 0600) :
safe_device_open(tape, O_RDONLY|m, 0600))
while ((to = host ? rmtopen(tape, O_RDONLY) :
safe_device_open(tape, O_RDONLY, 0600)) < 0) {
perror(tape);
while ((to = host ? rmtopen(tape, O_WRONLY) :
safe_device_open(tape, O_WRONLY, 0600)) < 0)
m = (access(tape, F_OK) == 0) ? 0 : O_CREAT;
rmtopen(tape, O_WRONLY) :
safe_device_open(tape, O_WRONLY|m, 0600))
tape, mt.mt_fileno+1, filenum);
m = (access(tape, F_OK) == 0) ? 0 : O_CREAT;
while ((to = host ? rmtopen(tape, O_RDONLY) :
safe_device_open(tape, O_RDONLY|m, 0600)) < 0) {
msg(gettext("Write error on %s\n"), tape);
if (strchr(tape, ':')) {
host = tape;
tape = strchr(host, ':');
*tape++ = 0;
rmtopen(char *tape, int mode)
(void) snprintf(buf, sizeof (buf), "O%s\n%d\n", tape, mode);
fd = rmtcall(tape, buf);
char *tape;
tape = strchr(host, ':');
*tape++ = '\0';
if (strlen(tape) > (sizeof (magtape) - 1)) {
(void) strcpy(magtape, tape);
dentry = devlist->tape;
dentry = devlist->tape;
devlist.audio = devlist.cd = devlist.floppy = devlist.tape =
tape = argv[2];
tape = getenv("TAPE");
if (tape == NULL) {
tape = DEFAULT_NRW_TAPE;
mtfd = open(tape, comp->c_oflag);
"%s: no tape loaded or drive offline\n", tape);
"%s: write protected or reserved.\n", tape);
perror(tape);
tape, comp->c_name, mt_fileno);
(void) fprintf(stderr, "%s %s %ld ", tape, comp->c_name,
(void) fprintf(stderr, "%s %s %lld ", tape,
char *tape;
static int tape = -1;
rval = llseek(tape, atoll(count), atoi(pos));
rval = (offset_t)ioctl(tape, MTIOCTOP,
rval = (offset_t)ioctl(tape, MTIOCGET, (char *)&mtget);
rval = (offset_t)write(tape, record, n);
rval = (offset_t)read(tape, record, n);
rval = (offset_t)close(tape);
(void) close(tape);
tape = open(device, O_LARGEFILE |
respond((offset_t)tape, errno);
if (tape >= 0) /* fork off */
dentry = dlist->tape;
dlist->tape = nentry;
dentry = dlist->tape;
dlist->tape = current;
dentry = &(dlist->tape);
dentry = devlist->tape;
deventry_t *tape;
SCSI_FAILOVER_OP("f_tape", tape);