+#ifdef USE_QFA
+ if (tapeposflag) {
+ msg("reading QFA positions from %s\n", gTapeposfile);
+ if ((gTapeposfp = fopen(gTapeposfile, "r")) == NULL)
+ errx(1, "can't open file for reading -- %s",
+ gTapeposfile);
+ /* start reading header info */
+ if (fgets(gTps, sizeof(gTps), gTapeposfp) == NULL)
+ errx(1, "not requested format of -- %s", gTapeposfile);
+ gTps[strlen(gTps) - 1] = 0; /* delete end of line */
+ if (strcmp(gTps, QFA_MAGIC) != 0)
+ errx(1, "not requested format of -- %s", gTapeposfile);
+ if (fgets(gTps, sizeof(gTps), gTapeposfp) == NULL)
+ errx(1, "not requested format of -- %s", gTapeposfile);
+ gTps[strlen(gTps) - 1] = 0;
+ if (strcmp(gTps, QFA_VERSION) != 0)
+ errx(1, "not requested format of -- %s", gTapeposfile);
+ /* read dumpdate */
+ if (fgets(gTps, sizeof(gTps), gTapeposfp) == NULL)
+ errx(1, "not requested format of -- %s", gTapeposfile);
+ gTps[strlen(gTps) - 1] = 0;
+ qfadumpdate = atol(gTps);
+ /* read empty line */
+ if (fgets(gTps, sizeof(gTps), gTapeposfp) == NULL)
+ errx(1, "not requested format of -- %s", gTapeposfile);
+ gTps[strlen(gTps) - 1] = 0;
+ /* read table header line */
+ if (fgets(gTps, sizeof(gTps), gTapeposfp) == NULL)
+ errx(1, "not requested format of -- %s", gTapeposfile);
+ gTps[strlen(gTps) - 1] = 0;
+ /* end reading header info */
+ /* tape position table starts here */
+ gSeekstart = ftell(gTapeposfp); /* remember for later use */
+#ifdef sunos
+ if (GetSCSIIDFromPath(inputdev, &scsiid)) {
+ errx(1, "can't get SCSI-ID for %s\n", inputdev);
+ }
+ if (scsiid < 0) {
+ errx(1, "can't get SCSI-ID for %s\n", inputdev);
+ }
+ sprintf(smtcpath, "/dev/rsmtc%ld,0", scsiid);
+ if ((fdsmtc = open(smtcpath, O_RDWR)) == -1) {
+ errx(1, "can't open smtc device: %s, %d\n", smtcpath, errno);
+ }
+#endif
+ }
+#endif /* USE_QFA */
+