#include <assert.h>
#include <afs/afsutil.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <signal.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
#include <sys/file.h>
-#include <errno.h>
-#include <sys/time.h>
-#include <dirent.h>
#include <sys/wait.h>
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
+#if defined(AFS_LINUX20_ENV)
+#include <sys/resource.h>
#endif
#ifdef HAVE_SYS_FS_TYPES_H
#include <sys/fstyp.h>
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
+#include <ctype.h>
-#include <netinet/in.h>
+#include <afs/opr.h>
#include <afs/afs_args.h>
#include <afs/cellconfig.h>
-#include <ctype.h>
#include <afs/afssyscalls.h>
#include <afs/afsutil.h>
#ifdef AFS_DARWIN_ENV
#ifdef AFS_DARWIN80_ENV
-#include <sys/ioctl.h>
#include <sys/xattr.h>
#endif
#include <mach/mach.h>
int size, error;
size = sizeof(struct vmount) + ROUNDUP(strlen(cacheMountDir) + 1) + 5 * 4;
- /* Malloc the vmount structure */
- if ((vmountp = (struct vmount *)malloc(size)) == (struct vmount *)NULL) {
+ /* Malloc and zero the vmount structure */
+ if ((vmountp = calloc(1, size)) == NULL) {
printf("Can't allocate space for the vmount structure (AIX)\n");
exit(1);
}
- /* zero out the vmount structure */
- memset(vmountp, '\0', size);
-
/* transfer info into the vmount structure */
vmountp->vmt_revision = VMT_REVISION;
vmountp->vmt_length = size;