static IONotificationPortRef notify;
static io_object_t iterator;
static CFRunLoopSourceRef source;
-static DNSSDState dnsstate;
static int event_pid;
static int rootVolSet = 0; /*True if root volume name explicitly set */
int addrNum; /*Cell server address index being printed */
static int cacheFlags = 0; /*Flags to cache manager */
+#ifdef AFS_AIX32_ENV
static int nBiods = 5; /* AIX3.1 only */
+#endif
static int preallocs = 400; /* Def # of allocated memory blocks */
static int enable_peer_stats = 0; /* enable rx stats */
static int enable_process_stats = 0; /* enable rx stats */
int afsd_rmtsys = 0; /* Default: don't support rmtsys */
struct afs_cacheParams cparams; /* params passed to cache manager */
-static int HandleMTab();
+static int HandleMTab(void);
+int PartSizeOverflow(char *path, int cs);
#ifdef AFS_DARWIN_ENV
static void
afsd_sleep_callback(void * refCon, io_service_t service,
natural_t messageType, void * messageArgument )
{
- afs_int32 code;
-
switch (messageType) {
case kIOMessageCanSystemSleep:
/* Idle sleep is about to kick in; can
afsd_update_addresses(CFRunLoopTimerRef timer, void *info)
{
/* parse multihomed address files */
- afs_int32 addrbuf[MAXIPADDRS], maskbuf[MAXIPADDRS],
+ afs_uint32 addrbuf[MAXIPADDRS], maskbuf[MAXIPADDRS],
mtubuf[MAXIPADDRS];
char reason[1024];
afs_int32 code;
static void
afsd_event_cleanup(int signo) {
- DNSSDState *query = &dnsstate;
CFRunLoopRemoveSource(CFRunLoopGetCurrent(), source, kCFRunLoopDefaultMode);
CFRelease (source);
}
/* Adapted from "Living in a Dynamic TCP/IP Environment" technote. */
-static Boolean
+static void
afsd_install_events(void)
{
SCDynamicStoreContext ctx = {0};
*---------------------------------------------------------------------------*/
static int
-doGetXFileNumber(fname, filechar, maxNum)
- char *fname;
- char filechar;
- int maxNum;
+doGetXFileNumber(char *fname, char filechar, int maxNum)
{
int computedVNumber; /*The computed file number we return */
int filenameLen; /*Number of chars in filename */
}
int
-GetVFileNumber(fname, maxFile)
- char *fname;
- int maxFile;
+GetVFileNumber(char *fname, int maxFile)
{
return doGetXFileNumber(fname, 'V', maxFile);
}
int
-GetDDirNumber(fname, maxDir)
- char *fname;
- int maxDir;
+GetDDirNumber(char *fname, int maxDir)
{
return doGetXFileNumber(fname, 'D', maxDir);
}
*---------------------------------------------------------------------------*/
static int
-CreateCacheSubDir(basename, dirNum)
- char *basename;
- int dirNum;
+CreateCacheSubDir(char *basename, int dirNum)
{
static char rn[] = "CreateCacheSubDir"; /* Routine Name */
char dir[1024];
}
static int
-MoveCacheFile(basename, fromDir, toDir, cacheFile, maxDir)
- char *basename;
- int fromDir, toDir, cacheFile, maxDir;
+MoveCacheFile(char *basename, int fromDir, int toDir, int cacheFile,
+ int maxDir)
{
static char rn[] = "MoveCacheFile";
char from[1024], to[1024];
}
int
-CreateCacheFile(fname, statp)
- char *fname;
- struct stat *statp;
+CreateCacheFile(char *fname, struct stat *statp)
{
static char rn[] = "CreateCacheFile"; /*Routine name */
int cfd; /*File descriptor to AFS cache file */
static int
-doSweepAFSCache(vFilesFound, directory, dirNum, maxDir)
- int *vFilesFound;
- char *directory; /* /path/to/cache/directory */
- int dirNum; /* current directory number */
- int maxDir; /* maximum directory number */
+doSweepAFSCache(int *vFilesFound,
+ char *directory, /* /path/to/cache/directory */
+ int dirNum, /* current directory number */
+ int maxDir) /* maximum directory number */
{
static char rn[] = "doSweepAFSCache"; /* Routine Name */
char fullpn_FileToDelete[1024]; /*File to be deleted from cache */
}
int
-SweepAFSCache(vFilesFound)
- int *vFilesFound;
+SweepAFSCache(int *vFilesFound)
{
static char rn[] = "SweepAFSCache"; /*Routine name */
int maxDir = (cacheFiles + nFilesPerDir - 1) / nFilesPerDir;
return 0;
}
-static
+static int
ConfigCellAlias(struct afsconf_cellalias *aca,
void *arock, struct afsconf_dir *adir)
{
}
#ifdef AFS_AFSDB_ENV
-static
-AfsdbLookupHandler()
+static void
+AfsdbLookupHandler(void)
{
afs_int32 kernelMsg[64];
char acellName[128];
#endif
#endif
+int
mainproc(struct cmd_syndesc *as, void *arock)
{
static char rn[] = "afsd"; /*Name of this routine */
int cacheIteration; /*How many times through cache verification */
int vFilesFound; /*How many data cache files were found in sweep */
struct afsconf_dir *cdir; /* config dir */
- FILE *logfd;
char *fsTypeMsg = NULL;
#ifdef AFS_SUN5_ENV
struct stat st;
#endif
- afs_int32 vfs1_type = -1;
#ifdef AFS_SGI65_ENV
struct sched_param sp;
#endif
/* initialize the rx random number generator from user space */
{
/* parse multihomed address files */
- afs_int32 addrbuf[MAXIPADDRS], maskbuf[MAXIPADDRS],
+ afs_uint32 addrbuf[MAXIPADDRS], maskbuf[MAXIPADDRS],
mtubuf[MAXIPADDRS];
char reason[1024];
code =
#include "AFS_component_version_number.c"
-
+int
main(int argc, char **argv)
{
struct cmd_syndesc *ts;
#endif
static int
-HandleMTab()
+HandleMTab(void)
{
#if (defined (AFS_SUN_ENV) || defined (AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV)) && !defined(AFS_SUN58_ENV)
FILE *tfilep;
#if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV)
-call_syscall(param1, param2, param3, param4, param5, param6, param7)
- long param1, param2, param3, param4, param5, param6, param7;
+int
+call_syscall(long param1, long param2, long param3, long param4, long param5,
+ long param6, long param7)
{
int error;
#ifdef AFS_LINUX20_ENV
#endif
if (afsd_debug)
- printf("SScall(%d, %d, %d)=%d ", AFS_SYSCALL, AFSCALL_CALL, param1,
+ printf("SScall(%d, %d, %ld)=%d ", AFS_SYSCALL, AFSCALL_CALL, param1,
error);
return (error);
}