#include <afs/afsutil.h>
#include <afs/sys_prototypes.h>
-#if defined(AFS_SGI62_ENV) && !defined(AFS_SGI65_ENV)
-#include <sym.h>
-#include <symconst.h>
-#endif
-#ifdef AFS_SGI65_ENV
+#ifdef AFS_SGI_ENV
#include <sched.h>
#endif
#include <CoreFoundation/CoreFoundation.h>
static int event_pid;
-#ifndef AFS_ARM_DARWIN_ENV
-#define MACOS_EVENT_HANDLING 1
+#if !defined(AFS_ARM_DARWIN_ENV) && !defined(AFS_ARM64_DARWIN_ENV)
+# define MACOS_EVENT_HANDLING 1
#endif
#endif /* AFS_DARWIN_ENV */
static int rxmaxfrags = 0; /* Are we forcing a limit on frags? */
static int volume_ttl = 0; /* enable vldb cache timeout support */
-#ifdef AFS_SGI62_ENV
+#ifdef AFS_SGI_ENV
#define AFSD_INO_T ino64_t
#else
#define AFSD_INO_T afs_uint32
* -2: file exists in top-level
* >=0: file exists in Dxxx
*/
-#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX_ENV)
AFSD_INO_T *inode_for_V; /* Array of inodes for desired
* cache files */
#endif
FILE *cachefd; /*Descriptor for cache info file */
int parseResult; /*Result of our fscanf() */
int tCacheBlocks;
- char tCacheBaseDir[1024], *tbd, tCacheMountDir[1024], *tmd;
+ char tCacheBaseDir[1025], *tbd, tCacheMountDir[1025], *tmd;
if (afsd_debug)
printf("%s: Opening cache info file '%s'...\n", rn, fullpn_CacheInfo);
char fullpn_FileToDelete[1024]; /*File to be deleted from cache */
char *fileToDelete; /*Ptr to last component of above */
DIR *cdirp; /*Ptr to cache directory structure */
-#ifdef AFS_SGI62_ENV
+#ifdef AFS_SGI_ENV
struct dirent64 *currp; /*Current directory entry */
#else
struct dirent *currp; /*Current directory entry */
sprintf(fullpn_FileToDelete, "%s/", directory);
fileToDelete = fullpn_FileToDelete + strlen(fullpn_FileToDelete);
-#ifdef AFS_SGI62_ENV
+#ifdef AFS_SGI_ENV
for (currp = readdir64(cdirp); currp; currp = readdir64(cdirp))
#else
for (currp = readdir(cdirp); currp; currp = readdir(cdirp))
{
if (afsd_debug) {
printf("%s: Current directory entry:\n", rn);
-#if defined(AFS_SGI62_ENV) || defined(AFS_DARWIN90_ENV)
+#if defined(AFS_SGI_ENV) || defined(AFS_DARWIN90_ENV)
printf("\tinode=%" AFS_INT64_FMT ", reclen=%d, name='%s'\n", currp->d_ino,
currp->d_reclen, currp->d_name);
#elif defined(AFS_DFBSD_ENV) || defined(AFS_USR_DFBSD_ENV)
* file's inode, directory, and bump the number of files found
* total and in this directory.
*/
-#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX_ENV)
inode_for_V[vFileNum] = currp->d_ino;
#endif
dir_for_V[vFileNum] = dirNum; /* remember this directory */
SetNoBackupAttr(fullpn_CellInfoFile);
} else if ((strcmp(currp->d_name, ".") == 0)
|| (strcmp(currp->d_name, "..") == 0) ||
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
/* this is the ext3 journal file */
(strcmp(currp->d_name, ".journal") == 0) ||
#endif
vFileNum);
else {
struct stat statb;
-#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX_ENV)
assert(inode_for_V[vFileNum] == (AFSD_INO_T) 0);
#endif
sprintf(vFilePtr, "D%d/V%d", thisDir, vFileNum);
if (CreateCacheFile(fullpn_VFile, &statb))
printf("%s: Can't create '%s'\n", rn, fullpn_VFile);
else {
-#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX_ENV)
inode_for_V[vFileNum] = statb.st_ino;
#endif
dir_for_V[vFileNum] = thisDir;
/* might want to check here for anything else goofy, like cache pointed at a non-dedicated directory, etc */
-#ifdef AFS_LINUX24_ENV
+#ifdef AFS_LINUX_ENV
{
int res;
struct statfs statfsbuf;
if (res != 0) {
return "unable to statfs cache base directory";
}
-#if !defined(AFS_LINUX26_ENV)
- if (statfsbuf.f_type == 0x52654973) { /* REISERFS_SUPER_MAGIC */
- return "cannot use reiserfs as cache partition";
- } else if (statfsbuf.f_type == 0x58465342) { /* XFS_SUPER_MAGIC */
- return "cannot use xfs as cache partition";
- } else if (statfsbuf.f_type == 0x01021994) { /* TMPFS_SUPER_MAGIC */
- return "cannot use tmpfs as cache partition";
- } else if (statfsbuf.f_type != 0xEF53) {
- return "must use ext2 or ext3 for cache partition";
- }
-#endif
}
#endif
#ifdef AFS_SUN5_ENV
struct stat st;
#endif
-#ifdef AFS_SGI65_ENV
+#ifdef AFS_SGI_ENV
struct sched_param sp;
#endif
* Cold shutdown is the default
*/
printf("afsd: Shutting down all afs processes and afs state\n");
- code = afsd_syscall(AFSOP_SHUTDOWN, 1);
+ code = afsd_syscall(AFSOP_SHUTDOWN, 1); /* always AFS_COLD */
if (code) {
printf("afsd: AFS still mounted; Not shutting down\n");
exit(1);
cacheStatEntries);
}
-#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX_ENV)
/*
* Create and zero the inode table for the desired cache files.
*/
}
/* fall through to setup-by-inode */
}
-#if defined(AFS_SGI62_ENV) || !(defined(AFS_LINUX26_ENV) || defined(AFS_CACHE_VNODE_PATH))
+#if defined(AFS_SGI_ENV) || !(defined(AFS_LINUX_ENV) || defined(AFS_CACHE_VNODE_PATH))
afsd_syscall(AFSOP_CACHEINODE, inode_for_V[currVFile]);
#else
printf
params[3] = CAST_SYSCALL_PARAM((va_arg(ap, void *)));
break;
case AFSOP_CACHEINODE:
-#if defined AFS_SGI62_ENV
+#if defined AFS_SGI_ENV
{
afs_int64 tmp = va_arg(ap, afs_int64);
params[0] = CAST_SYSCALL_PARAM((afs_uint32)(tmp >> 32));