Added check for success of disk sync, should resolve bad ssd write issues

This commit is contained in:
bluesaxman 2021-09-08 14:05:14 -06:00
parent 7088f57ba6
commit 820f6e31a1

View File

@ -117,8 +117,11 @@ sub wipethemdrives {
seek($diskw,-10240000,2);
print $diskw $clobber; #End of Disk
close($diskw);
#######################################
system("sync"); #Need to check if this failes and actually fail the disk if it fails.
system("sync ".$disks->{$diskid}{path}) and do {
#if sync failes disk fails
print "\nWipe attemped $color{red}FAILED$color{reset}\n";
return ($? >> 8);
};
print "Wipe attempt complete, checking...";
# Read
open(my $diskr, "<", $disks->{$diskid}{path}) or return warning("could not open $disks->{$diskid}{path}");