${CC} -q64 ${CFLAGS} -c ${srcdir}/cfgafs.c -o cfgafs64.o
clean:
- $(RM) -f *.o *.Zlst *.map *.out cfgexport cfgafs *.ext AFS_component_version_number.c export.exp export64.exp
+ $(RM) -f *.o *.Zlst *.map *.out AFS_component_version_number.c
+ $(RM) -f export.exp export64.exp
+ $(RM) -f cfgexport cfgexport64
+ $(RM) -f cfgafs cfgafs64
+ $(RM) -f *.ext *.ext.nonfs
${DEST}/root.client/usr/vice/etc/dkload/export.ext: export.ext
${INSTALL} $? $@
clean:
- -$(RM) -rf STATIC* MODLOAD*
+ -$(RM) -rf STATIC* MODLOAD* $(AFS_OS_CLEAN)
-$(RM) -rf h net netinet rpc ufs machine inet nfs sys afs afsint asm asm-generic config rx linux
include ${TOP_OBJDIR}/src/config/Makefile.version
osi_vfsops_iauth.o \
osi_vnodeops_iauth.o
+AFS_OS_CLEAN = \
+ *.exp \
+ export.h
+
# System specific build commands
STRIP = /bin/strip
DBUG = -g
clean:
-$(RM) -rf UAFS* JUAFS* AFSWEB* nsapi des afs afsint config rx
- -$(RM) -f h net netinet rpc ufs machine inet nfs sys des linktest
+ -$(RM) -f h net netinet rpc ufs machine inet nfs sys des linktest $(AFS_OS_CLEAN)
${TOP_LIBDIR}/$(LIBAFSWEB): AFSWEB/$(LIBAFSWEB)
LIBAFSWEB = nsafs.a
LIBAFSWEBKRB = nsafs.krb.a
+
+AFS_OS_CLEAN = \
+ *.exp \
+ export.h
+
# To get __file__ (afs_osi_pag.c) you need to specify language level
# C99 to xlc_r like this:
OPTF=-O -qlanglvl=stdc99
struct VnodeDiskObject vnode;
struct VnodeClassInfo *vcp = &VnodeClassInfo[vLarge];
Inode oldinode, newinode;
- int code;
+ afs_sfsize_t code;
if (dir->copied || Testing)
return;
struct VnodeClassInfo *vcp = &VnodeClassInfo[vLarge];
Inode oldinode, newinode;
DirHandle newdir;
- register afs_int32 code;
+ afs_int32 code;
+ afs_sfsize_t lcode;
afs_int32 parentUnique = 1;
struct VnodeEssence *vnodeEssence;
if (Testing)
return;
Log("Salvaging directory %u...\n", dir->vnodeNumber);
- code =
+ lcode =
IH_IREAD(vnodeInfo[vLarge].handle,
vnodeIndexOffset(vcp, dir->vnodeNumber), (char *)&vnode,
sizeof(vnode));
- assert(code == sizeof(vnode));
+ assert(lcode == sizeof(vnode));
oldinode = VNDISK_GET_INO(&vnode);
/* Increment the version number by a whole lot to avoid problems with
* clients that were promised new version numbers--but the file server
if (code) {
/* didn't really build the new directory properly, let's just give up. */
code = IH_DEC(dir->ds_linkH, newinode, dir->rwVid);
- assert(code == 0);
Log("Directory salvage returned code %d, continuing.\n", code);
+ if (code) {
+ Log("also failed to decrement link count on new inode");
+ }
assert(1 == 2);
}
Log("Checking the results of the directory salvage...\n");
vnode.cloned = 0;
VNDISK_SET_INO(&vnode, newinode);
VNDISK_SET_LEN(&vnode, Length(&newdir));
- code =
+ lcode =
IH_IWRITE(vnodeInfo[vLarge].handle,
vnodeIndexOffset(vcp, dir->vnodeNumber), (char *)&vnode,
sizeof(vnode));
- assert(code == sizeof(vnode));
+ assert(lcode == sizeof(vnode));
#ifdef AFS_NT40_ENV
nt_sync(fileSysDevice);
#else
struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
char buf[SIZEOF_LARGEDISKVNODE];
struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
- int size;
+ afs_sfsize_t size;
StreamHandle_t *file;
int vnodeIndex;
int nVnodes;
struct VnodeEssence *vep;
afs_int32 v, pv;
IHandle_t *h;
- int nBytes;
+ afs_sfsize_t nBytes;
ViceFid pa;
VnodeId LFVnode, ThisVnode;
Unique LFUnique, ThisUnique;
ClearROInUseBit(struct VolumeSummary *summary)
{
IHandle_t *h = summary->volumeInfoHandle;
- int nBytes;
+ afs_sfsize_t nBytes;
VolumeDiskData volHeader;
static int
DumpFile(struct iod *iodp, int vnode, FdHandle_t * handleP)
{
- int code = 0, lcode = 0, error = 0;
+ int code = 0, error = 0;
afs_int32 pad = 0, offset;
afs_sfsize_t n, nbytes, howMany, howBig;
+ afs_foff_t lcode = 0;
byte *p;
#ifndef AFS_NT40_ENV
struct afs_stat status;
afs_sfsize_t size;
#ifdef AFS_AIX_ENV
#include <sys/statfs.h>
+#ifdef AFS_LARGEFILE_ENV
+ struct statfs64 tstatfs;
+#else /* !AFS_LARGEFILE_ENV */
struct statfs tstatfs;
+#endif /* !AFS_LARGEFILE_ENV */
+ int statfs_code;
#endif
#ifdef AFS_NT40_ENV
/* Unfortunately in AIX valuable fields such as st_blksize are
* gone from the stat structure.
*/
- fstatfs(handleP->fd_fd, &tstatfs);
+#ifdef AFS_LARGEFILE_ENV
+ statfs_code = fstatfs64(handleP->fd_fd, &tstatfs);
+#else /* !AFS_LARGEFILE_ENV */
+ statfs_code = fstatfs(handleP->fd_fd, &tstatfs);
+#endif /* !AFS_LARGEFILE_ENV */
+ if (statfs_code != 0) {
+ Log("DumpFile: fstatfs returned error code %d on descriptor %d\n", errno, handleP->fd_fd);
+ return VOLSERDUMPERROR;
+ }
howMany = tstatfs.f_bsize;
#else
howMany = status.st_blksize;
return VOLSERDUMPERROR;
}
- p = (unsigned char *)malloc(howMany);
+ p = (unsigned char *)malloc((size_t)howMany);
if (!p) {
- Log("1 Volser: DumpFile: no memory");
+ Log("1 Volser: DumpFile: not enough memory to allocate %u bytes\n", howMany);
return VOLSERDUMPERROR;
}
howMany = nbytes;
/* Read the data - unless we know we can't */
- n = (lcode ? 0 : FDH_READ(handleP, p, howMany));
+ n = (lcode ? 0 : FDH_READ(handleP, p, (size_t)howMany));
/* If read any good data and we null padded previously, log the
* amount that we had null padded.
/* Now seek over the data we could not get. An error here means we
* can't do the next read.
*/
- lcode = FDH_SEEK(handleP, ((size - nbytes) + howMany), SEEK_SET);
+ lcode = FDH_SEEK(handleP, (size_t)((size - nbytes) + howMany), SEEK_SET);
if (lcode != ((size - nbytes) + howMany)) {
if (lcode < 0) {
Log("1 Volser: DumpFile: Error %d seeking in inode %s for vnode %d\n", errno, PrintInode(NULL, handleP->fd_ih->ih_ino), vnode);
}
/* Now write the data out */
- if (iod_Write(iodp, (char *)p, howMany) != howMany)
+ if (iod_Write(iodp, (char *)p, (size_t)howMany) != howMany)
error = VOLSERDUMPERROR;
#ifndef AFS_PTHREAD_ENV
IOMGR_Poll();