btrbk: log DEBUG instead of WARN if run_cmd() fails. WARN messages are always printed on undef return value

pull/30/head
Axel Burri 2015-04-28 23:47:34 +02:00
parent 825fa61eb1
commit 444fba4a50
1 changed files with 4 additions and 4 deletions

8
btrbk
View File

@ -154,7 +154,7 @@ sub run_cmd($;$)
if($?) { if($?) {
my $exitcode= $? >> 8; my $exitcode= $? >> 8;
my $signal = $? & 127; my $signal = $? & 127;
WARN "Command execution failed (exitcode=$exitcode" . ($signal ? ", signal=$signal" : "") . "): \"$cmd\""; DEBUG "Command execution failed (exitcode=$exitcode" . ($signal ? ", signal=$signal" : "") . "): \"$cmd\"";
return undef; return undef;
} }
else { else {
@ -1001,7 +1001,7 @@ sub macro_send_receive($@)
return 1; return 1;
} else { } else {
$info{ERROR} = 1; $info{ERROR} = 1;
$config_target->{ABORTED} = "btrfs send/receive command failed"; $config_target->{ABORTED} = "Failed to send/receive subvolume";
return undef; return undef;
} }
} }
@ -1924,7 +1924,7 @@ MAIN:
$config_target->{SUBVOL_DELETED} = $delete; $config_target->{SUBVOL_DELETED} = $delete;
} }
else { else {
$config_target->{ABORTED} = "btrfs subvolume delete command failed"; $config_target->{ABORTED} = "Failed to delete subvolume";
$target_aborted = 1; $target_aborted = 1;
} }
} }
@ -1959,7 +1959,7 @@ MAIN:
$config_subvol->{SUBVOL_DELETED} = $delete; $config_subvol->{SUBVOL_DELETED} = $delete;
} }
else { else {
$config_subvol->{ABORTED} = "btrfs subvolume delete command failed"; $config_subvol->{ABORTED} = "Failed to delete delete subvolume";
} }
} }
} }