Fixed progress calculations on disk zeroing and change to write a 4k block at a time.
This commit is contained in:
parent
4edd340135
commit
5e78718881
8
wipe.pl
8
wipe.pl
@ -149,10 +149,10 @@ sub wipethemdrives {
|
|||||||
seek($longdiskw,0,2);
|
seek($longdiskw,0,2);
|
||||||
my $totalBytes = tell($longdiskw);
|
my $totalBytes = tell($longdiskw);
|
||||||
seek($longdiskw,0,0);
|
seek($longdiskw,0,0);
|
||||||
for (0..$totalBytes) {
|
for (0..($totalBytes/4096)) {
|
||||||
print $longdiskw "\0";
|
print $longdiskw "\0"x4096;
|
||||||
if ( !(tell($longdiskw) % ($totalBytes / 1000)) ) {
|
if ( !(tell($longdiskw) % (16*4096)) ) {
|
||||||
printf(" %5.5s%%\r\r\r\r\r\r\r", sprintf("%.2f", (tell($longdiskw)/$totalBytes)) );
|
printf(" %5.5s%%\r", sprintf("%.2f", (tell($longdiskw)/$totalBytes)) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user