From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Haertel Message-Id: <200205262307.g4QN7N9w000378@ducky.net> To: 9fans@cse.psu.edu Subject: [9fans] minor bug in dd + fix Date: Sun, 26 May 2002 16:07:23 -0700 Topicbox-Message-UUID: 9ce3d2ac-eaca-11e9-9e20-41e7f4b1d025 While looking into the disk/format bug, I noticed that dd is printing incorrect counts of blocks written. The reason is that it is incrementing the count of blocks written before it actually checks to see if the write succeeded. Here's a fix: term% diff dd.c.old dd.c 293,295d292 < if(obc == obs) < nofr++; else < nopr++; 297a295,296 > if (c > 0) > ++nopr; 300a300,303 > if(obc == obs) > nofr++; > else > nopr++;