From 51b2a5a9f5dd5777befc8ae2d90c1331de23c005 Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Wed, 19 Oct 2022 11:24:11 +0200 Subject: [PATCH] btrbk: tidy comments --- btrbk | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/btrbk b/btrbk index 7dcd2ad..abc85d9 100755 --- a/btrbk +++ b/btrbk @@ -337,18 +337,14 @@ my %raw_info_sort = ( FILE => 2, RECEIVED_UUID => 3, RECEIVED_PARENT_UUID => 4, - INCOMPLETE => 5, - # disabled for now, as its not very useful and might leak information - #source_url => 6, - #parent_url => 7, - #target_url => 8, - compress => 9, - split => 10, - encrypt => 11, - cipher => 12, - iv => 13, + compress => 10, + split => 11, + encrypt => 12, + cipher => 13, + iv => 14, # kdf_* (generated by kdf_backend) - ); + INCOMPLETE => 100, +); my %raw_url_cache; # map URL to (fake) btr_tree node my %mountinfo_cache; # map MACHINE_ID to mount points (sorted descending by file length) @@ -1636,12 +1632,9 @@ sub btrfs_send_to_file($$$;$$) TYPE => 'raw', RECEIVED_UUID => $received_uuid, INCOMPLETE => 1, - # source_url => $source->{URL}, ); my $target_filename = $source->{NAME} || die; - # $target_filename .= "--$received_uuid"; - # $target_filename .= '@' . $parent_uuid if($parent_uuid); $target_filename .= ".btrfs"; my $compress = config_compress_hash($target, "raw_target_compress"); @@ -1863,11 +1856,9 @@ sub btrfs_send_to_file($$$;$$) rsh => vinfo_rsh($target), ); if(defined($ret)) { - # Write raw info file again, this time wihtout incomplete flag delete $raw_info{INCOMPLETE}; $ret = system_write_raw_info($vol_received, \%raw_info); - } - else { + } else { push @cmd_err, "failed to check target file (not present or zero length): $check_file"; } }