X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=restore%2Futilities.c;h=627e147875ee44d5454aa4f8810f8462e852ed97;hp=e2bf2e2682f955f18df33bc80661ab32ab53f1ee;hb=5d2a3d246d400d45dfd4c49ddb588c69fb60873d;hpb=35b24fb7fabcf6df3b37aebf70c228d5b0688d32 diff --git a/restore/utilities.c b/restore/utilities.c index e2bf2e2..627e147 100644 --- a/restore/utilities.c +++ b/restore/utilities.c @@ -2,8 +2,8 @@ * Ported to Linux's Second Extended File System as part of the * dump and restore backup suit * Remy Card , 1994-1997 - * Stelian Pop , 1999-2000 - * Stelian Pop - Alcôve , 2000 + * Stelian Pop , 1999-2000 + * Stelian Pop - Alcôve , 2000-2002 */ /* @@ -41,7 +41,7 @@ #ifndef lint static const char rcsid[] = - "$Id: utilities.c,v 1.14 2001/04/10 12:46:53 stelian Exp $"; + "$Id: utilities.c,v 1.19 2002/01/25 15:09:00 stelian Exp $"; #endif /* not lint */ #include @@ -56,7 +56,12 @@ static const char rcsid[] = #ifdef __linux__ #include +#include +#ifdef HAVE_EXT2FS_EXT2_FS_H +#include +#else #include +#endif #include #include #else /* __linux__ */ @@ -73,7 +78,7 @@ static const char rcsid[] = void pathcheck(char *name) { - register char *cp; + char *cp; struct entry *ep; char *start; @@ -314,7 +319,7 @@ delwhiteout(struct entry *ep) dump_ino_t lowerbnd(dump_ino_t start) { - register struct entry *ep; + struct entry *ep; for ( ; start < maxino; start++) { ep = lookupino(start); @@ -332,7 +337,7 @@ lowerbnd(dump_ino_t start) dump_ino_t upperbnd(dump_ino_t start) { - register struct entry *ep; + struct entry *ep; for ( ; start > ROOTINO; start--) { ep = lookupino(start); @@ -480,13 +485,13 @@ panic(fmt, va_alist) * if no smaller inode found return tnum=0 and tpos=0 */ int -Inode2Tapepos(dump_ino_t ino, long *tnum, long *tpos, int exactmatch) +Inode2Tapepos(dump_ino_t ino, long *tnum, long long *tpos, int exactmatch) { char *p, *pp; char numbuff[32]; unsigned long tmpino; long tmptnum; - long tmptpos; + long long tmptpos; *tpos = 0; *tnum = 0; @@ -518,7 +523,7 @@ Inode2Tapepos(dump_ino_t ino, long *tnum, long *tpos, int exactmatch) /* read tapepos */ while ((*p != 0) && (*p != '\t')) *pp++ = *p++; - tmptpos = atol(numbuff); + tmptpos = atoll(numbuff); if (exactmatch) { if (tmpino == ino) {