        return 0;
     }
  
-@@ -825,7 +909,7 @@
+@@ -825,7 +911,7 @@
     nb = ::read(fd, buffer, s);
     if (s != nb) {		/* read error */
        errno=EIO;

 int faketape::close()
 {
    check_eof();
@@ -756,18 +840,15 @@
    fd = -1;
    return 0;
 }

       break;
 
    case MTOFFL:                 /* put tape offline */
@@ -253,19 +262,30 @@
       break;
 
    case MTEOM:/* Go to the end of the recorded media (for appending files). */
+      while (next_FM) {
+	 lseek(fd, next_FM, SEEK_SET);
+	 if (read_next_fm(true)) {
+	    current_file++;
+	 }
+      }
+      off_t l;
+      while (::read(fd, &l, sizeof(l)) > 0) {
