Fix uninitialized $remouvable var

This commit is contained in:
Daniel Berteaud 2015-07-20 11:49:35 +02:00
parent 6f52ff1fab
commit f5a7ebdfed

View File

@ -33,7 +33,7 @@ sub list_smart_hdd{
next unless (system("/usr/sbin/smartctl -A /dev/$block >/dev/null 2>&1") == 0); next unless (system("/usr/sbin/smartctl -A /dev/$block >/dev/null 2>&1") == 0);
if ($param->{skip_remouvable} && -e "/sys/block/$block/removable"){ if ($param->{skip_remouvable} && -e "/sys/block/$block/removable"){
open REMOVABLE, "/sys/block/$block/removable"; open REMOVABLE, "/sys/block/$block/removable";
$removable = join "", <REMOVABLE>; my $removable = join "", <REMOVABLE>;
close REMOVABLE; close REMOVABLE;
chomp($removable); chomp($removable);
next if ($removable eq '1'); next if ($removable eq '1');