mirror of
https://forge.murkfall.net/bluesaxman/squeegy.git
synced 2026-03-13 03:14:21 -06:00
Fixed progress calculations on disk zeroing and change to write a 4k block at a time.
This commit is contained in:
8
wipe.pl
8
wipe.pl
@@ -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)) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user