]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Cleanup for supporting large file
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 8 May 2008 19:09:59 +0000 (19:09 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 8 May 2008 19:09:59 +0000 (19:09 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6919 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/patches/testing/faketape.c

index f4d714180de59973537972d2a9cda21a2fd7d39f..0e54ff3fabac4d5e481010c3c6b9140f27d51b3b 100644 (file)
@@ -43,9 +43,8 @@ Device {
 
  */
 
-#include <dirent.h>
-#include <sys/mtio.h>
-#include <ctype.h>
+#include "bacula.h"            /* define 64bit file usage */
+#include "stored.h"
 #include "faketape.h"
 
 static int dbglevel = 10;
@@ -774,7 +773,7 @@ int faketape::open(const char *pathname, int uflags)
       return -1;
    }
 
-   fd = ::open(pathname, O_CREAT | O_RDWR, 0700);
+   fd = ::open(pathname, O_CREAT | O_RDWR | O_LARGEFILE, 0700);
    if (fd < 0) {
       return -1;
    }
@@ -822,10 +821,10 @@ int faketape::seek_file()
    if(lseek(fd, pos, SEEK_SET) == -1) {
       return -1;
    }
+   last_file = (last_file > current_file)?last_file:current_file;
    if (current_block > 0) {
       fsr(current_block);
    }
-   last_file = (last_file > current_file)?last_file:current_file;
    inplace = true;
 
    return 0;