current_file = 0;
current_block = -1;
- max_block = 2*1024*2048; /* 2GB */
+ max_block = VTAPE_MAX_BLOCK;
}
vtape::~vtape()
/* If the vtape is empty, start by writing a EOF */
if (online && !read_fm(VT_READ_EOF)) {
- weof();
+ lseek(fd, 0, SEEK_SET); /* rewind */
+ cur_FM = next_FM = last_FM = 0; /* reset */
+ weof(); /* write the first EOF */
last_file = current_file=0;
}