From: Derrick Brashear Date: Mon, 10 Mar 2003 02:00:20 +0000 (+0000) Subject: xstat-protoizing-20030309 X-Git-Tag: openafs-devel-1_3_50~332 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=08534f1345f9a4e0fbf7ecb8cfb96bbd6d20ba40;p=packages%2Fo%2Fopenafs.git xstat-protoizing-20030309 protoize one more directory --- diff --git a/src/xstat/xstat_cm.c b/src/xstat/xstat_cm.c index 6a571bf53..e6430a4af 100644 --- a/src/xstat/xstat_cm.c +++ b/src/xstat/xstat_cm.c @@ -84,9 +84,7 @@ static afs_int32 *xstat_cm_collIDP; /*Ptr to collection IDs desired*/ *------------------------------------------------------------------------*/ static int xstat_cm_CleanupInit() - -{ /*xstat_cm_CleanupInit*/ - +{ xstat_cm_ConnInfo = (struct xstat_cm_ConnectionInfo *)0; xstat_cm_Results.probeNum = 0; xstat_cm_Results.probeTime = 0; @@ -97,8 +95,7 @@ static int xstat_cm_CleanupInit() xstat_cm_Results.probeOK = 0; return(0); - -} /*xstat_cm_CleanupInit*/ +} /*------------------------------------------------------------------------ @@ -124,11 +121,8 @@ static int xstat_cm_CleanupInit() * (if so directed). *------------------------------------------------------------------------*/ -int xstat_cm_Cleanup(a_releaseMem) - int a_releaseMem; - -{ /*xstat_cm_Cleanup*/ - +int xstat_cm_Cleanup(int a_releaseMem) +{ static char rn[] = "xstat_cm_Cleanup"; /*Routine name*/ int code; /*Return code*/ int conn_idx; /*Current connection index*/ @@ -183,8 +177,7 @@ int xstat_cm_Cleanup(a_releaseMem) * Return the news, whatever it is. */ return(code); - -} /*xstat_cm_Cleanup*/ +} /*------------------------------------------------------------------------ @@ -209,11 +202,8 @@ int xstat_cm_Cleanup(a_releaseMem) * Side Effects: * As advertised. *------------------------------------------------------------------------*/ - static void xstat_cm_LWP() - -{ /*xstat_cm_LWP*/ - +{ static char rn[] = "xstat_cm_LWP"; /*Routine name*/ register afs_int32 code; /*Results of calls*/ int oneShotCode; /*Result of one-shot signal*/ @@ -367,8 +357,7 @@ static void xstat_cm_LWP() rn, code); } /*Continuous execution*/ } /*Service loop*/ - -} /*xstat_cm_LWP*/ +} /*------------------------------------------------------------------------ @@ -402,17 +391,10 @@ static void xstat_cm_LWP() * Sets up just about everything. *------------------------------------------------------------------------*/ -int xstat_cm_Init(a_numServers, a_socketArray, a_ProbeFreqInSecs, - a_ProbeHandler, a_flags, a_numCollections, a_collIDP) - int a_numServers; - struct sockaddr_in *a_socketArray; - int a_ProbeFreqInSecs; - int (*a_ProbeHandler)(); - int a_flags; - int a_numCollections; - afs_int32 *a_collIDP; - -{ /*xstat_cm_Init*/ +int xstat_cm_Init(int a_numServers, struct sockaddr_in *a_socketArray, + int a_ProbeFreqInSecs, int (*a_ProbeHandler)(), int a_flags, + int a_numCollections, afs_int32 *a_collIDP) +{ static char rn[] = "xstat_cm_Init"; /*Routine name*/ register afs_int32 code; /*Return value*/ @@ -634,8 +616,7 @@ int xstat_cm_Init(a_numServers, a_socketArray, a_ProbeFreqInSecs, return(-2); else return(0); - -} /*xstat_cm_Init*/ +} /*------------------------------------------------------------------------ @@ -659,9 +640,7 @@ int xstat_cm_Init(a_numServers, a_socketArray, a_ProbeFreqInSecs, *------------------------------------------------------------------------*/ int xstat_cm_ForceProbeNow() - -{ /*xstat_cm_ForceProbeNow*/ - +{ static char rn[] = "xstat_cm_ForceProbeNow"; /*Routine name*/ /* @@ -681,5 +660,4 @@ int xstat_cm_ForceProbeNow() * We did it, so report the happy news. */ return(0); - -} /*xstat_cm_ForceProbeNow*/ +} diff --git a/src/xstat/xstat_fs.c b/src/xstat/xstat_fs.c index 178df2dd6..abe048073 100644 --- a/src/xstat/xstat_fs.c +++ b/src/xstat/xstat_fs.c @@ -102,9 +102,7 @@ static afs_int32 *xstat_fs_collIDP; /*Ptr to collection IDs desired*/ *------------------------------------------------------------------------*/ static int xstat_fs_CleanupInit() - -{ /*xstat_fs_CleanupInit*/ - +{ afs_int32 code; /*Return code from callback stubs*/ struct rx_call *rxcall; /*Bogus param*/ AFSCBFids *Fids_Array; /*Bogus param*/ @@ -135,8 +133,7 @@ static int xstat_fs_CleanupInit() return(code); code = SRXAFSCB_Probe(rxcall); return(code); - -} /*xstat_fs_CleanupInit*/ +} /*------------------------------------------------------------------------ @@ -162,11 +159,8 @@ static int xstat_fs_CleanupInit() * (if so directed). *------------------------------------------------------------------------*/ -int xstat_fs_Cleanup(a_releaseMem) - int a_releaseMem; - -{ /*xstat_fs_Cleanup*/ - +int xstat_fs_Cleanup(int a_releaseMem) +{ static char rn[] = "xstat_fs_Cleanup"; /*Routine name*/ int code; /*Return code*/ int conn_idx; /*Current connection index*/ @@ -221,8 +215,7 @@ int xstat_fs_Cleanup(a_releaseMem) * Return the news, whatever it is. */ return(code); - -} /*xstat_fs_Cleanup*/ +} /*------------------------------------------------------------------------ @@ -249,9 +242,7 @@ int xstat_fs_Cleanup(a_releaseMem) *------------------------------------------------------------------------*/ static void xstat_fs_LWP() - -{ /*xstat_fs_LWP*/ - +{ static char rn[] = "xstat_fs_LWP"; /*Routine name*/ register afs_int32 code; /*Results of calls*/ int oneShotCode; /*Result of one-shot signal*/ @@ -402,9 +393,7 @@ static void xstat_fs_LWP() rn, code); } /*Continuous execution*/ } /*Service loop*/ - -} /*xstat_fs_LWP*/ - +} /*------------------------------------------------------------------------ * [exported] xstat_fs_Init @@ -439,18 +428,10 @@ static void xstat_fs_LWP() * Sets up just about everything. *------------------------------------------------------------------------*/ -int xstat_fs_Init(a_numServers, a_socketArray, a_ProbeFreqInSecs, a_ProbeHandler, - a_flags, a_numCollections, a_collIDP) - int a_numServers; - struct sockaddr_in *a_socketArray; - int a_ProbeFreqInSecs; - int (*a_ProbeHandler)(); - int a_flags; - int a_numCollections; - afs_int32 *a_collIDP; - -{ /*xstat_fs_Init*/ - +int xstat_fs_Init(int a_numServers, struct sockaddr_in *a_socketArray, + int a_ProbeFreqInSecs, int (*a_ProbeHandler)(), int a_flags, + int a_numCollections, afs_int32 *a_collIDP) +{ static char rn[] = "xstat_fs_Init"; /*Routine name*/ register afs_int32 code; /*Return value*/ static struct rx_securityClass *CBsecobj; /*Callback security object*/ @@ -730,8 +711,7 @@ int xstat_fs_Init(a_numServers, a_socketArray, a_ProbeFreqInSecs, a_ProbeHandler return(-2); else return(0); - -} /*xstat_fs_Init*/ +} /*------------------------------------------------------------------------ @@ -755,9 +735,7 @@ int xstat_fs_Init(a_numServers, a_socketArray, a_ProbeFreqInSecs, a_ProbeHandler *------------------------------------------------------------------------*/ int xstat_fs_ForceProbeNow() - -{ /*xstat_fs_ForceProbeNow*/ - +{ static char rn[] = "xstat_fs_ForceProbeNow"; /*Routine name*/ /* @@ -777,5 +755,4 @@ int xstat_fs_ForceProbeNow() * We did it, so report the happy news. */ return(0); - -} /*xstat_fs_ForceProbeNow*/ +} diff --git a/src/xstat/xstat_fs_test.c b/src/xstat/xstat_fs_test.c index 6ee1271bb..604fd0097 100644 --- a/src/xstat/xstat_fs_test.c +++ b/src/xstat/xstat_fs_test.c @@ -112,7 +112,6 @@ static char *xferOpNames[] = { *------------------------------------------------------------------------*/ void PrintCallInfo() - { /*PrintCallInfo*/ static char rn[] = "PrintCallInfo"; /*Routine name*/ @@ -165,11 +164,8 @@ void PrintCallInfo() * As advertised. *------------------------------------------------------------------------*/ -void PrintOverallPerfInfo(a_ovP) - struct afs_PerfStats *a_ovP; - -{ /*PrintOverallPerfInfo*/ - +void PrintOverallPerfInfo(struct afs_PerfStats *a_ovP) +{ printf("\t%10d numPerfCalls\n\n", a_ovP->numPerfCalls); /* @@ -256,8 +252,7 @@ void PrintOverallPerfInfo(a_ovP) printf("\t%10d host_ClientBlocks\n\n", a_ovP->host_ClientBlocks); printf("\t%10d sysname_ID\n", a_ovP->sysname_ID); - -} /*PrintOverallPerfInfo*/ +} /*------------------------------------------------------------------------ @@ -280,12 +275,8 @@ void PrintOverallPerfInfo(a_ovP) * As advertised. *------------------------------------------------------------------------*/ -void PrintOpTiming(a_opIdx, a_opTimeP) - int a_opIdx; - struct fs_stats_opTimingData *a_opTimeP; - -{ /*PrintOpTiming*/ - +void PrintOpTiming(int a_opIdx, struct fs_stats_opTimingData *a_opTimeP) +{ double fSumTime, avg; fSumTime = ((double)(a_opTimeP->sumTime.tv_sec)) + @@ -300,8 +291,7 @@ void PrintOpTiming(a_opIdx, a_opTimeP) a_opTimeP->sqrTime.tv_sec, a_opTimeP->sqrTime.tv_usec, a_opTimeP->minTime.tv_sec, a_opTimeP->minTime.tv_usec, a_opTimeP->maxTime.tv_sec, a_opTimeP->maxTime.tv_usec); - -} /*PrintOpTiming*/ +} /*------------------------------------------------------------------------ @@ -324,12 +314,8 @@ void PrintOpTiming(a_opIdx, a_opTimeP) * As advertised. *------------------------------------------------------------------------*/ -void PrintXferTiming(a_opIdx, a_xferP) - int a_opIdx; - struct fs_stats_xferData *a_xferP; - -{ /*PrintXferTiming*/ - +void PrintXferTiming(int a_opIdx, struct fs_stats_xferData *a_xferP) +{ double fSumTime, avg; fSumTime = ((double)(a_xferP->sumTime.tv_sec)) + @@ -356,9 +342,7 @@ void PrintXferTiming(a_opIdx, a_xferP) a_xferP->count[6], a_xferP->count[7], a_xferP->count[8]); - - -} /*PrintXferTiming*/ +} /*------------------------------------------------------------------------ @@ -380,11 +364,8 @@ void PrintXferTiming(a_opIdx, a_xferP) * As advertised. *------------------------------------------------------------------------*/ -void PrintDetailedPerfInfo(a_detP) - struct fs_stats_DetailedStats *a_detP; - -{ /*PrintDetailedPerfInfo*/ - +void PrintDetailedPerfInfo(struct fs_stats_DetailedStats *a_detP) +{ int currIdx; /*Loop variable*/ printf("\t%10d epoch\n", a_detP->epoch); @@ -394,8 +375,7 @@ void PrintDetailedPerfInfo(a_detP) for (currIdx = 0; currIdx < FS_STATS_NUM_XFER_OPS; currIdx++) PrintXferTiming(currIdx, &(a_detP->xferOpTimes[currIdx])); - -} /*PrintDetailedPerfInfo*/ +} /*------------------------------------------------------------------------ @@ -419,8 +399,7 @@ void PrintDetailedPerfInfo(a_detP) *------------------------------------------------------------------------*/ void PrintFullPerfInfo() - -{ /*PrintFullPerfInfo*/ +{ static char rn[] = "PrintFullPerfInfo"; /*Routine name*/ static afs_int32 fullPerfInt32s = @@ -450,8 +429,7 @@ void PrintFullPerfInfo() PrintOverallPerfInfo(&(fullPerfP->overall)); PrintDetailedPerfInfo(&(fullPerfP->det)); - -} /*PrintFullPerfInfo*/ +} /*------------------------------------------------------------------------ @@ -475,9 +453,7 @@ void PrintFullPerfInfo() *------------------------------------------------------------------------*/ void PrintPerfInfo() - -{ /*PrintPerfInfo*/ - +{ static char rn[] = "PrintPerfInfo"; /*Routine name*/ static afs_int32 perfInt32s = (sizeof(struct afs_PerfStats) >> 2); /*Correct # int32s to rcv*/ @@ -504,8 +480,7 @@ void PrintPerfInfo() printableTime); PrintOverallPerfInfo(perfP); - -} /*PrintPerfInfo*/ +} /*------------------------------------------------------------------------ @@ -533,9 +508,7 @@ void PrintPerfInfo() *------------------------------------------------------------------------*/ int FS_Handler() - -{ /*FS_Handler*/ - +{ static char rn[] = "FS_Handler"; /*Routine name*/ printf("\n------------------------------------------------------------\n"); @@ -573,8 +546,7 @@ int FS_Handler() * Return the happy news. */ return(0); - -} /*FS_Handler*/ +} /*------------------------------------------------------------------------ @@ -597,10 +569,8 @@ int FS_Handler() * As advertised. *------------------------------------------------------------------------*/ -static int CountListItems(a_firstItem) - struct cmd_item *a_firstItem; - -{ /*CountListItems*/ +static int CountListItems(struct cmd_item *a_firstItem) +{ int list_len; /*List length*/ struct cmd_item *curr_item; /*Ptr to current item*/ @@ -620,8 +590,7 @@ static int CountListItems(a_firstItem) * Return our tally. */ return(list_len); - -} /*CountListItems*/ +} /*------------------------------------------------------------------------ @@ -647,11 +616,8 @@ static int CountListItems(a_firstItem) * As advertised. *------------------------------------------------------------------------*/ -int RunTheTest(a_s) - struct cmd_syndesc *a_s; - -{ /*RunTheTest*/ - +int RunTheTest(struct cmd_syndesc *a_s) +{ static char rn[] = "RunTheTest"; /*Routine name*/ int code; /*Return code*/ int numFSs; /*# File Servers to monitor*/ @@ -826,18 +792,13 @@ int RunTheTest(a_s) code = xstat_fs_Cleanup(1); /*Get rid of malloc'ed data*/ rx_Finalize(); return(0); - -} /*RunTheTest*/ +} #include "AFS_component_version_number.c" -main(argc, argv) - int argc; - char **argv; - -{ /*Main routine*/ - +int main(int argc, char **argv) +{ static char rn[] = "xstat_fs_test"; /*Routine name*/ register afs_int32 code; /*Return code*/ struct cmd_syndesc *ts; /*Ptr to cmd line syntax desc*/ @@ -872,6 +833,5 @@ main(argc, argv) } exit(code); - -} /*Main routine*/ +}