From: Nathan Neulinger Date: Thu, 13 Mar 2003 14:06:51 +0000 (+0000) Subject: largefile-do-offsets-correctly-when-64bit-but-not-largefile-20030313 X-Git-Tag: openafs-devel-1_3_50~322 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=f54bdeeb8501ae07d94d0e4205073518974bfbea;p=packages%2Fo%2Fopenafs.git largefile-do-offsets-correctly-when-64bit-but-not-largefile-20030313 a 64 bit aware platform may not support largefiles yet --- diff --git a/src/volser/dumpstuff.c b/src/volser/dumpstuff.c index d5a9a119d..85da7bca9 100644 --- a/src/volser/dumpstuff.c +++ b/src/volser/dumpstuff.c @@ -1118,29 +1118,29 @@ static afs_offs_t volser_WriteFile(int vn, struct iod *iodp, FdHandle_t *handleP *status = 0; -#ifdef AFS_LARGEFILE_ENV +#ifdef AFS_64BIT_ENV { - afs_uint32 filesize_high, filesize_low; + afs_uint32 filesize_high = 0L, filesize_low = 0L; +#ifdef AFS_LARGEFILE_ENV if (tag == 'h') { if (!ReadInt32(iodp, &filesize_high) ) { *status = 1; return(0); } - } else { - filesize_high = 0L; } +#endif if (!ReadInt32(iodp, &filesize_low)) { *status = 1; return(0); } FillInt64(filesize, filesize_high, filesize_low); } -#else /* !AFS_LARGEFILE_ENV */ +#else /* !AFS_64BIT_ENV */ if (!ReadInt32(iodp, &filesize)) { *status = 1; return(0); } -#endif /* !AFS_LARGEFILE_ENV */ +#endif /* !AFS_64BIT_ENV */ p = (unsigned char *) malloc(size); if (p == NULL) { *status = 2; @@ -1151,7 +1151,7 @@ static afs_offs_t volser_WriteFile(int vn, struct iod *iodp, FdHandle_t *handleP size = nbytes; if ((code = iod_Read(iodp, p, size)) != size) { -#ifdef AFS_LARGEFILE_ENV +#ifdef AFS_64BIT_ENV Log("1 Volser: WriteFile: Error reading dump file %d size=(0X%x,0X%x) nbytes=%d (%d of %d); restore aborted\n", vn, (unsigned) (filesize >> 32), (unsigned) (filesize & 0xffffffff),