mirror of https://github.com/jimsalterjrs/sanoid
Merge pull request #266 from phreaker0/fix-warnings
fix uninitialized value warning in debug mode on initial run (no snap…
This commit is contained in:
commit
aba870c965
22
sanoid
22
sanoid
|
|
@ -553,16 +553,20 @@ sub blabber {
|
||||||
my $path = $config{$section}{'path'};
|
my $path = $config{$section}{'path'};
|
||||||
print "Filesystem $path has:\n";
|
print "Filesystem $path has:\n";
|
||||||
print " $snapsbypath{$path}{'numsnaps'} total snapshots ";
|
print " $snapsbypath{$path}{'numsnaps'} total snapshots ";
|
||||||
print "(newest: ";
|
if ($snapsbypath{$path}{'numsnaps'} == 0) {
|
||||||
my $newest = sprintf("%.1f",$snapsbypath{$path}{'newest'} / 60 / 60);
|
print "(no current snapshots)"
|
||||||
print "$newest hours old)\n";
|
} else {
|
||||||
|
print "(newest: ";
|
||||||
|
my $newest = sprintf("%.1f",$snapsbypath{$path}{'newest'} / 60 / 60);
|
||||||
|
print "$newest hours old)\n";
|
||||||
|
|
||||||
foreach my $type (keys %{ $snapsbytype{$path} }){
|
foreach my $type (keys %{ $snapsbytype{$path} }){
|
||||||
print " $snapsbytype{$path}{$type}{'numsnaps'} $type\n";
|
print " $snapsbytype{$path}{$type}{'numsnaps'} $type\n";
|
||||||
print " desired: $config{$section}{$type}\n";
|
print " desired: $config{$section}{$type}\n";
|
||||||
print " newest: ";
|
print " newest: ";
|
||||||
my $newest = sprintf("%.1f",($snapsbytype{$path}{$type}{'newest'} / 60 / 60));
|
my $newest = sprintf("%.1f",($snapsbytype{$path}{$type}{'newest'} / 60 / 60));
|
||||||
print "$newest hours old, named $snapsbytype{$path}{$type}{'newestname'}\n";
|
print "$newest hours old, named $snapsbytype{$path}{$type}{'newestname'}\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print "\n\n";
|
print "\n\n";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue