Fixed progress calculations on disk zeroing and change to write a 4k block at a time.

This commit is contained in:
bluesaxman 2019-11-05 09:46:53 -07:00
parent 4edd340135
commit 5e78718881

View File

@ -149,10 +149,10 @@ sub wipethemdrives {
seek($longdiskw,0,2);
my $totalBytes = tell($longdiskw);
seek($longdiskw,0,0);
for (0..$totalBytes) {
print $longdiskw "\0";
if ( !(tell($longdiskw) % ($totalBytes / 1000)) ) {
printf(" %5.5s%%\r\r\r\r\r\r\r", sprintf("%.2f", (tell($longdiskw)/$totalBytes)) );
for (0..($totalBytes/4096)) {
print $longdiskw "\0"x4096;
if ( !(tell($longdiskw) % (16*4096)) ) {
printf(" %5.5s%%\r", sprintf("%.2f", (tell($longdiskw)/$totalBytes)) );
}
}
}