]> git.wh0rd.org - dump.git/commitdiff
Fix restore when symtab file is over 2GB in size.
authorStelian Pop <stelian@popies.net>
Thu, 7 Jul 2005 08:47:13 +0000 (08:47 +0000)
committerStelian Pop <stelian@popies.net>
Thu, 7 Jul 2005 08:47:13 +0000 (08:47 +0000)
CHANGES
compat/include/compatlfs.h
restore/symtab.c

diff --git a/CHANGES b/CHANGES
index 1c3488f7a2d8bb474778da168fa7f9164c80d383..2099f0eaf6202940514f7a840fc3c6aab3770e69 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-$Id: CHANGES,v 1.277 2005/06/08 13:24:08 stelian Exp $
+$Id: CHANGES,v 1.278 2005/07/07 08:47:13 stelian Exp $
 
 Changes between versions 0.4b40 and 0.4b41 (released ???????????)
 =================================================================
@@ -10,6 +10,8 @@ Changes between versions 0.4b40 and 0.4b41 (released ???????????)
 2.     Fix some issues with restoration of EA on big endian
        platforms.
 
+3.     Fix restore when the symtab is over 2GB in size.
+
 Changes between versions 0.4b39 and 0.4b40 (released May 2, 2005)
 =================================================================
 
index fe7db5f2fb7857dbbe17d1d0e0b0f3d6ebf21ecf..b5cb0a780a5de2e24996cc95d65698a19a7794a5 100644 (file)
@@ -3,7 +3,7 @@
  *     dump and restore backup suit
  *     Stelian Pop <stelian@popies.net> - AlcĂ´ve <www.alcove.com>, 2000-2002
  *
- *     $Id: compatlfs.h,v 1.5 2004/03/29 13:57:29 stelian Exp $
+ *     $Id: compatlfs.h,v 1.6 2005/07/07 08:47:16 stelian Exp $
  */
 
 /*-
 
 #define _LARGEFILE64_SOURCE
 #define OPEN open64
+#define FOPEN fopen64
 #define LSEEK lseek64
 #define STAT stat64
+#define FSTAT fstat64
 #define LSTAT lstat64
 #define FTRUNCATE ftruncate64
 #define OFF_T __off64_t
 #else
 
 #define OPEN open
+#define FOPEN fopen
 #define LSEEK lseek
 #define STAT stat
+#define FSTAT fstat
 #define LSTAT lstat
 #define FTRUNCATE ftruncate
 #define OFF_T off_t
index b69259a7fe9185986fddbe54477cac1c6ace6dfc..06548bcee6e5a84c7bbd0e8eae6c614eb877b57d 100644 (file)
@@ -37,7 +37,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: symtab.c,v 1.25 2005/03/30 13:34:00 stelian Exp $";
+       "$Id: symtab.c,v 1.26 2005/07/07 08:47:16 stelian Exp $";
 #endif /* not lint */
 
 /*
@@ -50,6 +50,7 @@ static const char rcsid[] =
  */
 
 #include <config.h>
+#include <compatlfs.h>
 #include <sys/param.h>
 #include <sys/stat.h>
 
@@ -554,7 +555,7 @@ dumpsymtable(char *filename, long checkpt)
        Vprintf(stdout, "Check pointing the restore\n");
        if (Nflag)
                return;
-       if ((fd = fopen(filename, "w")) == NULL) {
+       if ((fd = FOPEN(filename, "w")) == NULL) {
                warn("fopen");
                panic("cannot create save file %s for symbol table\n",
                        filename);
@@ -654,7 +655,7 @@ initsymtable(char *filename)
        struct entry *ep;
        struct entry *baseep, *lep;
        struct symtableheader hdr;
-       struct stat stbuf;
+       struct STAT stbuf;
        long i;
        int fd;
 
@@ -669,11 +670,11 @@ initsymtable(char *filename)
                ep->e_flags |= NEW;
                return;
        }
-       if ((fd = open(filename, O_RDONLY, 0)) < 0) {
+       if ((fd = OPEN(filename, O_RDONLY, 0)) < 0) {
                warn("open");
                errx(1, "cannot open symbol table file %s", filename);
        }
-       if (fstat(fd, &stbuf) < 0) {
+       if (FSTAT(fd, &stbuf) < 0) {
                warn("stat");
                errx(1, "cannot stat symbol table file %s", filename);
        }