* Gersh <[EMAIL PROTECTED]> [010327 15:50] wrote:
> Attatched is a updated version of the patch with a few ideas from the list
> aswell as cam/scsi/scsi_da.c modified aswell. Thanks for all the comments.
> #endif
> - printf("%ld ", (long)(count * DEV_BSIZE) / (1024 * 1024));
> + /*
> + * Rate limit printf's to replace old DELAY(1000)
> + * This is done so that old slow serial connections
> + * do not get hosed.
> + */
> +
> + left++;
> + percent = left * 100 / total;
> +
> + if (!(percent % 10) && (state - percent))
> + {
> + printf("%d ", percent);
> + state = percent;
> + }
> }
I still don't understand why you need the variable 'state'
should probably be:
if (percent % 10 == 0)
printf("%d%%, ", percent);
--
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
Daemon News Magazine in your snail-mail! http://magazine.daemonnews.org/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message