From 3bfd9c653f4916fd0708062c4bf4da7cab586338 Mon Sep 17 00:00:00 2001 From: bluesaxman Date: Wed, 8 Sep 2021 15:07:14 -0600 Subject: [PATCH] Minor syntax corrections --- wipe.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wipe.pl b/wipe.pl index fabbf58..6d7f607 100755 --- a/wipe.pl +++ b/wipe.pl @@ -113,7 +113,7 @@ sub wipethemdrives { $disksum2 = $clobsum; } else { system("hdparm -W 0 ".$disks->{$diskid}{path}) and do { - print "Cannot turn off drive write caching: $!\n" + print "Cannot turn off drive write caching: $!\n"; print "Disk considered $color{red}FAILED$color{reset}\n"; $disks->{$diskid}{failure} = "Cannot turn off write caching"; return 0; @@ -230,9 +230,9 @@ while () { if ($disks{$diskid}{wipe} == 1) { $disks{$diskid}{smartpass} = smartcheck($diskid,\%disks); if ($disks{$diskid}{smartpass} == 1) { - push(@good, sprintf("%-26.26s\t%46.46s\t%30.30s",$disks{$diskid}{serial},$disks{$diskid}{model}, $disks{$diskid}{failure} or "")); - } else { push(@failed, sprintf("%-26.26s\t%46.46s\t%30.30s",$disks{$diskid}{serial},$disks{$diskid}{model}, $disks{$diskid}{failure} or "")); } - } else { push(@failed, sprintf("%26.26s\t%46.46s\t%30.30s",$disks{$diskid}{serial}, "-"x46, $disks{$diskid}{failure} or "")); } + push(@good, sprintf("%-26.26s\t%46.46s\t%30.30s",$disks{$diskid}{serial},$disks{$diskid}{model}, ($disks{$diskid}{failure} or ""))); + } else { push(@failed, sprintf("%-26.26s\t%46.46s\t%30.30s",$disks{$diskid}{serial},$disks{$diskid}{model}, ($disks{$diskid}{failure} or "") )); } + } else { push(@failed, sprintf("%26.26s\t%46.46s\t%30.30s",$disks{$diskid}{serial}, "-"x46, ($disks{$diskid}{failure} or "") )); } print "="x80; print "\n"x5; }