/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include "afsincludes.h" /* Afs-based standard headers */
#include "afs/afs_stats.h"
#include "rx/rx_globals.h"
+#include "rx/rxstat.h"
#if !defined(UKERNEL) && !defined(AFS_LINUX20_ENV)
#include "net/if.h"
#ifdef AFS_SGI62_ENV
#include "h/hashing.h"
#endif
-#if !defined(AFS_HPUX110_ENV) && !defined(AFS_DARWIN60_ENV)
+#if !defined(AFS_HPUX110_ENV) && !defined(AFS_DARWIN_ENV)
#include "netinet/in_var.h"
#endif
#endif /* !defined(UKERNEL) */
afs_int32 afs_showflags = GAGUSER | GAGCONSOLE; /* show all messages */
-void afs_Daemon(void)
+void
+afs_Daemon(void)
{
afs_int32 now, last10MinCheck, last60MinCheck;
}
-void afspag_Init(afs_int32 nfs_server_addr)
+void
+afspag_Init(afs_int32 nfs_server_addr)
{
struct clientcred ccred;
struct rmtbulk idata, odata;
AFS_GLOCK();
afs_InitStats();
+ rx_SetBusyChannelError(RX_CALL_TIMEOUT);
rx_Init(htons(7001));
AFS_STATCNT(afs_ResourceInit);
AFS_RWLOCK_INIT(&afs_xpagcell, "afs_xpagcell");
AFS_RWLOCK_INIT(&afs_xpagsys, "afs_xpagsys");
AFS_RWLOCK_INIT(&afs_icl_lock, "afs_icl_lock");
-#ifndef AFS_FBSD_ENV
- LOCK_INIT(&osi_fsplock, "osi_fsplock");
- LOCK_INIT(&osi_flplock, "osi_flplock");
-#endif
afs_resourceinit_flag = 1;
afs_nfs_server_addr = nfs_server_addr;
- for (i = 0; i < MAXNUMSYSNAMES; i++)
+ for (i = 0; i < MAXNUMSYSNAMES; i++) {
afs_sysnamelist[i] = afs_osi_Alloc(MAXSYSNAME);
+ osi_Assert(afs_sysnamelist[i] != NULL);
+ }
afs_sysname = afs_sysnamelist[0];
strcpy(afs_sysname, SYS_NAME);
afs_sysnamecount = 1;
#ifdef RXK_LISTENER_ENV
afs_start_thread(rxk_Listener, "Rx Listener");
#endif
- afs_start_thread(rx_ServerProc, "Rx Server Thread");
+ afs_start_thread((void *)(void *)rx_ServerProc, "Rx Server Thread");
afs_start_thread(afs_rxevent_daemon, "Rx Event Daemon");
afs_start_thread(afs_Daemon, "AFS PAG Daemon");
/* called with the GLOCK held */
-void afspag_Shutdown(void)
+void
+afspag_Shutdown(void)
{
if (afs_shuttingdown)
return;
#endif
}
-static void token_conversion(char *buffer, int buf_size, int in)
+static void
+token_conversion(char *buffer, int buf_size, int in)
{
struct ClearToken *ticket;
afs_int32 *lptr, n;
return;
}
-static void FetchVolumeStatus_conversion(char *buffer, int buf_size, int in)
+static void
+FetchVolumeStatus_conversion(char *buffer, int buf_size, int in)
{
AFSFetchVolumeStatus *status = (AFSFetchVolumeStatus *)buffer;
}
}
-static void inparam_conversion(int cmd, char *buffer, int buf_size, int in)
+static void
+inparam_conversion(int cmd, char *buffer, int buf_size, int in)
{
afs_int32 *lptr = (afs_int32 *)buffer;
}
}
-static void outparam_conversion(int cmd, char *buffer, int buf_size, int in)
+static void
+outparam_conversion(int cmd, char *buffer, int buf_size, int in)
{
afs_int32 *lptr = (afs_int32 *)buffer;
int i;
#ifdef AFS_SUN5_ENV
afs_syscall_pioctl(path, com, cmarg, follow, rvp, credp)
rval_t *rvp;
- struct AFS_UCRED *credp;
+ afs_ucred_t *credp;
#else
#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
afs_syscall_pioctl(path, com, cmarg, follow, credp)
- struct AFS_UCRED *credp;
+ afs_ucred_t *credp;
#else
afs_syscall_pioctl(path, com, cmarg, follow)
#endif
/* Set up credentials */
memset(&ccred, 0, sizeof(ccred));
pag = PagInCred(credp);
- ccred.uid = credp->cr_uid;
+ ccred.uid = afs_cr_uid(credp);
if (pag != NOPAG) {
afs_get_groups_from_pag(pag, &g0, &g1);
ccred.group0 = g0;