]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Fix bad value for the first Last FM
authorEric Bollengier <eric@eb.homelinux.org>
Sun, 31 Aug 2008 17:57:29 +0000 (17:57 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Sun, 31 Aug 2008 17:57:29 +0000 (17:57 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7534 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/stored/vtape.c

index 99e9fdd13559ecea286e9503879702135d41f811..daeb7d9a66310af7939004babc64f7637cfa5879 100644 (file)
@@ -961,7 +961,9 @@ int vtape::open(const char *pathname, int uflags)
 
    /* 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;
    }