+/*
+ * handle multiple dumps per tape by skipping forward to the
+ * appropriate one.
+ */
+setdumpnum()
+{
+ struct mtop tcom;
+
+ if (dumpnum == 1 || volno != 1)
+ return;
+ if (pipein) {
+ fprintf(stderr, "Cannot have multiple dumps on pipe input\n");
+ done(1);
+ }
+ tcom.mt_op = MTFSF;
+ tcom.mt_count = dumpnum - 1;
+#ifdef RRESTOR
+ rmtioctl(MTFSF, dumpnum - 1);
+#else
+ if (ioctl(mt, (int)MTIOCTOP, (char *)&tcom) < 0)
+ perror("ioctl MTFSF");
+#endif
+}
+