From 444fba4a5061c0b3e6363102cdf1bb25ba0b4a22 Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Tue, 28 Apr 2015 23:47:34 +0200 Subject: [PATCH] btrbk: log DEBUG instead of WARN if run_cmd() fails. WARN messages are always printed on undef return value --- btrbk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/btrbk b/btrbk index 381d269..706152a 100755 --- a/btrbk +++ b/btrbk @@ -154,7 +154,7 @@ sub run_cmd($;$) if($?) { my $exitcode= $? >> 8; 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; } else { @@ -1001,7 +1001,7 @@ sub macro_send_receive($@) return 1; } else { $info{ERROR} = 1; - $config_target->{ABORTED} = "btrfs send/receive command failed"; + $config_target->{ABORTED} = "Failed to send/receive subvolume"; return undef; } } @@ -1924,7 +1924,7 @@ MAIN: $config_target->{SUBVOL_DELETED} = $delete; } else { - $config_target->{ABORTED} = "btrfs subvolume delete command failed"; + $config_target->{ABORTED} = "Failed to delete subvolume"; $target_aborted = 1; } } @@ -1959,7 +1959,7 @@ MAIN: $config_subvol->{SUBVOL_DELETED} = $delete; } else { - $config_subvol->{ABORTED} = "btrfs subvolume delete command failed"; + $config_subvol->{ABORTED} = "Failed to delete delete subvolume"; } } }