From: Love Hörnquist-Åstrand Date: Fri, 5 Oct 2001 22:10:54 +0000 (+0000) Subject: viced-hosts-dump-make-output-more-useful-for-holds-20011005 X-Git-Tag: openafs-devel-1_3_0~254 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=5f002d755ff25f976f50c8e4d976f28caa245751;p=packages%2Fo%2Fopenafs.git viced-hosts-dump-make-output-more-useful-for-holds-20011005 don't just print pointer to holds array --- diff --git a/src/viced/host.c b/src/viced/host.c index 0cda0be6c..f2048d23d 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -1590,8 +1590,8 @@ static int h_DumpHost(host, held, file) 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, @@ -1609,8 +1609,16 @@ static int h_DumpHost(host, held, file) 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;