* directory or online at http://www.openafs.org/dl/license10.html
*/
-#include <afs/param.h>
#include <afsconfig.h>
+#include <afs/param.h>
RCSID("$Header$");
register int i;
block = (struct CEBlock *)malloc(sizeof(struct CEBlock));
- if (!block)
+ if (!block) {
+ ViceLog(0, ("Failed malloc in GetCEBlock\n"));
ShutDownAndCore(PANIC);
+ }
for(i = 0; i < (CESPERBLOCK -1); i++) {
Lock_Init(&block->entry[i].lock);
if (CEFree == 0)
GetCEBlock();
- if (CEFree == 0)
+ if (CEFree == 0) {
+ ViceLog(0, ("CEFree NULL in GetCE\n"));
ShutDownAndCore(PANIC);
+ }
entry = CEFree;
CEFree = entry->next;
CEs++;
- bzero((char *)entry, CLIENT_TO_ZERO(entry));
+ memset((char *)entry, 0, CLIENT_TO_ZERO(entry));
return(entry);
} /*GetCE*/
static int index = 0;
block = (struct HTBlock *)malloc(sizeof(struct HTBlock));
- if (!block)
+ if (!block) {
+ ViceLog(0, ("Failed malloc in GetHTBlock\n"));
ShutDownAndCore(PANIC);
+ }
#ifdef AFS_PTHREAD_ENV
for(i=0; i < (h_HTSPERBLOCK); i++)
entry = HTFree;
HTFree = entry->next;
HTs++;
- bzero((char *)entry, HOST_TO_ZERO(entry));
+ memset((char *)entry, 0, HOST_TO_ZERO(entry));
return(entry);
} /*GetHT*/
char tmpStr[256];
H_LOCK
- sprintf(tmpStr, "ip:%x holds:%d port:%d hidx:%d cbid:%d lock:%x last:%u active:%u down:%d del:%d cons:%d cldel:%d\n\t hpfailed:%d hcpsCall:%u hcps [",
- host->host, host->holds, host->port, host->index, host->cblist,
+ sprintf(tmpStr, "ip:%x port:%d hidx:%d cbid:%d lock:%x last:%u active:%u down:%d del:%d cons:%d cldel:%d\n\t hpfailed:%d hcpsCall:%u hcps [",
+ host->host, host->port, host->index, host->cblist,
CheckLock(&host->lock), host->LastCall, host->ActiveCall,
(host->hostFlags & VENUSDOWN), host->hostFlags&HOSTDELETED,
host->Console, host->hostFlags & CLIENTDELETED,
sprintf(tmpStr, " %x", host->interface->addr[i]);
STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file);
}
- sprintf(tmpStr, "]\n");
+ sprintf(tmpStr, "] holds: ");
STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file);
+
+ for (i = 0 ; i < h_maxSlots ; i++) {
+ sprintf(tmpStr, "%04x", host->holds[i]);
+ STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file);
+ }
+ sprintf(tmpStr, " slot/bit: %d/%d\n", h_holdSlot(), h_holdbit());
+ STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file);
+
H_UNLOCK
return held;
afs_uint32 now = FT_ApproxTime();
- bzero((char *)&zerofid, sizeof(zerofid));
+ memset((char *)&zerofid, 0, sizeof(zerofid));
/*
* Send a probe to the workstation if it hasn't been heard from in
* 15 minutes