btrbk: cosmetics: reformat a regex to be much more readable

pull/219/merge
Samantha McVey 2018-06-03 09:16:26 -07:00 committed by Axel Burri
parent 969569592a
commit 211943d4af
1 changed files with 8 additions and 1 deletions

9
btrbk
View File

@ -1037,7 +1037,14 @@ sub btrfs_subvolume_list($;@)
{
my %node;
# NOTE: btrfs-progs >= 4.13.2 pads uuid's with 36 whitespaces
unless(/^ID\s+([0-9]+)\s+gen\s+([0-9]+)\s+cgen\s+([0-9]+)\s+top level\s+([0-9]+)\s+parent_uuid\s+([0-9a-f-]+)\s+received_uuid\s+([0-9a-f-]+)\s+uuid\s+([0-9a-f-]+)\s+path\s+(.+)$/) {
unless(/^ID \s+ ([0-9]+) \s+
gen \s+ ([0-9]+) \s+
cgen \s+ ([0-9]+) \s+
top\ level \s+ ([0-9]+) \s+
parent_uuid \s+ ([0-9a-f-]+) \s+
received_uuid \s+ ([0-9a-f-]+) \s+
uuid \s+ ([0-9a-f-]+) \s+
path \s+ (.+) $/x) {
ERROR "Failed to parse subvolume list (unsupported btrfs-progs) for: $vol->{PRINT}";
DEBUG "Offending line: $_";
return undef;