The attached patch corrects the printing of a couple of counters returned from rxdebug: they are unsigned, hence should be printed with %u instead of %d.

bcc'd to openafs-bugs.

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rainer Toebbicke
European Laboratory for Particle Physics(CERN) - Geneva, Switzerland
Phone: +41 22 767 8985       Fax: +41 22 767 7155
*** openafs/src/rx/rx.c.1rig    2005-04-14 10:29:22.000000000 +0200
--- openafs/src/rx/rx.c 2005-05-09 11:11:59.000000000 +0200
***************
*** 5977,6025 ****
            s->packetRequests);
  
      if (version >= RX_DEBUGI_VERSION_W_NEWPACKETTYPES) {
!       fprintf(file, "alloc-failures(rcv %d/%d,send %d/%d,ack %d)\n",
                s->receivePktAllocFailures, s->receiveCbufPktAllocFailures,
                s->sendPktAllocFailures, s->sendCbufPktAllocFailures,
                s->specialPktAllocFailures);
      } else {
!       fprintf(file, "alloc-failures(rcv %d,send %d,ack %d)\n",
                s->receivePktAllocFailures, s->sendPktAllocFailures,
                s->specialPktAllocFailures);
      }
  
      fprintf(file,
!           "   greedy %d, " "bogusReads %d (last from host %x), "
!           "noPackets %d, " "noBuffers %d, " "selects %d, "
!           "sendSelects %d\n", s->socketGreedy, s->bogusPacketOnRead,
            s->bogusHost, s->noPacketOnRead, s->noPacketBuffersOnRead,
            s->selects, s->sendSelects);
  
      fprintf(file, "   packets read: ");
      for (i = 0; i < RX_N_PACKET_TYPES; i++) {
!       fprintf(file, "%s %d ", rx_packetTypes[i], s->packetsRead[i]);
      }
      fprintf(file, "\n");
  
      fprintf(file,
!           "   other read counters: data %d, " "ack %d, " "dup %d "
!           "spurious %d " "dally %d\n", s->dataPacketsRead,
            s->ackPacketsRead, s->dupPacketsRead, s->spuriousPacketsRead,
            s->ignorePacketDally);
  
      fprintf(file, "   packets sent: ");
      for (i = 0; i < RX_N_PACKET_TYPES; i++) {
!       fprintf(file, "%s %d ", rx_packetTypes[i], s->packetsSent[i]);
      }
      fprintf(file, "\n");
  
      fprintf(file,
!           "   other send counters: ack %d, " "data %d (not resends), "
!           "resends %d, " "pushed %d, " "acked&ignored %d\n",
            s->ackPacketsSent, s->dataPacketsSent, s->dataPacketsReSent,
            s->dataPacketsPushed, s->ignoreAckedPacket);
  
      fprintf(file,
!           "   \t(these should be small) sendFailed %d, " "fatalErrors %d\n",
            s->netSendFailures, (int)s->fatalErrors);
  
      if (s->nRttSamples) {
--- 5977,6025 ----
            s->packetRequests);
  
      if (version >= RX_DEBUGI_VERSION_W_NEWPACKETTYPES) {
!       fprintf(file, "alloc-failures(rcv %u/%u,send %u/%u,ack %u)\n",
                s->receivePktAllocFailures, s->receiveCbufPktAllocFailures,
                s->sendPktAllocFailures, s->sendCbufPktAllocFailures,
                s->specialPktAllocFailures);
      } else {
!       fprintf(file, "alloc-failures(rcv %u,send %u,ack %u)\n",
                s->receivePktAllocFailures, s->sendPktAllocFailures,
                s->specialPktAllocFailures);
      }
  
      fprintf(file,
!           "   greedy %u, " "bogusReads %u (last from host %x), "
!           "noPackets %u, " "noBuffers %u, " "selects %u, "
!           "sendSelects %u\n", s->socketGreedy, s->bogusPacketOnRead,
            s->bogusHost, s->noPacketOnRead, s->noPacketBuffersOnRead,
            s->selects, s->sendSelects);
  
      fprintf(file, "   packets read: ");
      for (i = 0; i < RX_N_PACKET_TYPES; i++) {
!       fprintf(file, "%s %u ", rx_packetTypes[i], s->packetsRead[i]);
      }
      fprintf(file, "\n");
  
      fprintf(file,
!           "   other read counters: data %u, " "ack %u, " "dup %u "
!           "spurious %u " "dally %u\n", s->dataPacketsRead,
            s->ackPacketsRead, s->dupPacketsRead, s->spuriousPacketsRead,
            s->ignorePacketDally);
  
      fprintf(file, "   packets sent: ");
      for (i = 0; i < RX_N_PACKET_TYPES; i++) {
!       fprintf(file, "%s %u ", rx_packetTypes[i], s->packetsSent[i]);
      }
      fprintf(file, "\n");
  
      fprintf(file,
!           "   other send counters: ack %u, " "data %u (not resends), "
!           "resends %u, " "pushed %u, " "acked&ignored %u\n",
            s->ackPacketsSent, s->dataPacketsSent, s->dataPacketsReSent,
            s->dataPacketsPushed, s->ignoreAckedPacket);
  
      fprintf(file,
!           "   \t(these should be small) sendFailed %u, " "fatalErrors %u\n",
            s->netSendFailures, (int)s->fatalErrors);
  
      if (s->nRttSamples) {

Reply via email to