From 2809dc54c5bda7014cf7c42b3134f90a50a7fa9e Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Wed, 27 Sep 2017 20:41:51 +0200 Subject: [PATCH] btrbk: remove sorting of deleted subvolumes in summary (not needed anymore) Deleted subvolumes are already sorted by schedule(). Sorting by PATH is bad anyways, as it does not sort _NN postfix correctly. --- btrbk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/btrbk b/btrbk index 2e445c0..4a7cdfa 100755 --- a/btrbk +++ b/btrbk @@ -4640,7 +4640,7 @@ MAIN: $create_mode = "!!!" if($_->{ERROR}); push @subvol_out, "$create_mode $_->{received_subvolume}->{PRINT}"; } - foreach(sort { $a->{PATH} cmp $b->{PATH} } @{$droot->{SUBVOL_DELETED} // []}) { + foreach(@{$droot->{SUBVOL_DELETED} // []}) { push @subvol_out, "--- $_->{PRINT}"; } if((ABORTED($droot) && (ABORTED($droot) ne "USER_SKIP")) || @@ -5821,7 +5821,7 @@ MAIN: if($svol->{SNAPSHOT_CREATED}) { push @subvol_out, "+++ $svol->{SNAPSHOT_CREATED}->{PRINT}"; } - foreach(sort { $a->{PATH} cmp $b->{PATH} } @{$svol->{SUBVOL_DELETED} // []}) { + foreach(@{$svol->{SUBVOL_DELETED} // []}) { push @subvol_out, "--- $_->{PRINT}"; } foreach my $droot (vinfo_subsection($svol, 'target', 1)) { @@ -5833,7 +5833,7 @@ MAIN: push @subvol_out, "$create_mode $_->{received_subvolume}->{PRINT}"; } - foreach(sort { $a->{PATH} cmp $b->{PATH} } @{$droot->{SUBVOL_DELETED} // []}) { + foreach(@{$droot->{SUBVOL_DELETED} // []}) { push @subvol_out, "--- $_->{PRINT}"; }