/*
* 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 <afsconfig.h>
#include <afs/param.h>
+#include <roken.h>
-
-#include <string.h>
-
-#include <fsprobe.h> /*Interface for this module */
#include <lwp.h> /*Lightweight process package */
#include <afs/cellconfig.h>
#include <afs/afsint.h>
#include <afs/afsutil.h>
-
-#define LWP_STACK_SIZE (16 * 1024)
+#include <afs/volser.h>
+#include <afs/volser_prototypes.h>
+#define FSINT_COMMON_XG
+#include <afs/afscbint.h>
-/*
- * Routines we need that don't have explicit include file definitions.
- */
-extern int RXAFSCB_ExecuteRequest(struct rx_call *); /*AFS callback dispatcher */
+#include "fsprobe.h" /*Interface for this module */
-/*
- * Help out the linker by explicitly importing the callback routines.
- */
-extern afs_int32 SRXAFSCB_CallBack(struct rx_call *, AFSCBFids *, AFSCBs *);
-extern afs_int32 SRXAFSCB_InitCallBackState2(struct rx_call *,
- struct interfaceAddr *);
-extern afs_int32 SRXAFSCB_Probe(struct rx_call *);
+#define LWP_STACK_SIZE (16 * 1024)
/*
* Exported variables.
{ /*fsprobe_LWP */
static char rn[] = "fsprobe_LWP"; /*Routine name */
- register afs_int32 code; /*Results of calls */
+ afs_int32 code; /*Results of calls */
struct timeval tv; /*Time structure */
int conn_idx; /*Connection index */
struct fsprobe_ConnectionInfo *curr_conn; /*Current connection */
RXAFS_GetStatistics64(curr_conn->rxconn, STATS64_VERSION, &stats64);
if (*curr_probeOK == RXGEN_OPCODE)
*curr_probeOK =
- RXAFS_GetStatistics(curr_conn->rxconn, curr_stats);
+ RXAFS_GetStatistics(curr_conn->rxconn, (ViceStatistics *)curr_stats);
else if (*curr_probeOK == 0) {
curr_stats->CurrentTime = RoundInt64ToInt32(stats64.ViceStatistics64_val[STATS64_CURRENTTIME]);
curr_stats->BootTime = RoundInt64ToInt32(stats64.ViceStatistics64_val[STATS64_BOOTTIME]);
strcpy(curr_stats->Disk[i].Name, pname);
}
if (code == RXGEN_OPCODE) {
- code =
- AFSVolPartitionInfo(curr_conn->rxVolconn,
+ code =
+ AFSVolPartitionInfo(curr_conn->rxVolconn,
pname, &partition);
if (!code) {
curr_stats->Disk[i].BlocksAvailable =
{
struct pIDs partIds;
struct partEntries partEnts;
- register int i, j = 0, code;
+ int i, j = 0, code;
*cntp = 0;
if (newvolserver == 1) {
*------------------------------------------------------------------------*/
int
-fsprobe_Init(int a_numServers, struct sockaddr_in *a_socketArray,
+fsprobe_Init(int a_numServers, struct sockaddr_in *a_socketArray,
int a_ProbeFreqInSecs, int (*a_ProbeHandler)(void),
int a_debug)
{ /*fsprobe_Init */
static char rn[] = "fsprobe_Init"; /*Routine name */
- register afs_int32 code; /*Return value */
+ afs_int32 code; /*Return value */
static struct rx_securityClass *CBsecobj; /*Callback security object */
struct rx_securityClass *secobj; /*Client security object */
struct rx_service *rxsrv_afsserver; /*Server for AFS */
malloc(a_numServers * sizeof(struct fsprobe_ConnectionInfo));
if (fsprobe_ConnInfo == (struct fsprobe_ConnectionInfo *)0) {
fprintf(stderr,
- "[%s] Can't allocate %d connection info structs (%lu bytes)\n",
+ "[%s] Can't allocate %d connection info structs (%"AFS_SIZET_FMT" bytes)\n",
rn, a_numServers,
(a_numServers * sizeof(struct fsprobe_ConnectionInfo)));
return (-1); /*No cleanup needs to be done yet */