From 8434c6881cd38ff996bc50bae976bbf3dbf750be Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Sun, 8 Sep 2019 18:06:31 +0200 Subject: [PATCH] btrbk: system_list_mountinfo: also fetch mount_options (not only super_options) This should have no impact on current code: "subvol" and "subvolid" are used, which are only in super_options. --- btrbk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/btrbk b/btrbk index bf1bf9b..bf22aae 100755 --- a/btrbk +++ b/btrbk @@ -1862,13 +1862,15 @@ sub system_list_mountinfo($) return undef; } my %line = %+; - foreach (split(',', $line{super_options})) { + # merge super_options and mount_options to MNTOPS. + foreach (split(',', $line{super_options}), split(',', $line{mount_options})) { if(/^(.+?)=(.+)$/) { $line{MNTOPS}->{$1} = $2; } else { $line{MNTOPS}->{$_} = 1; } } + $line{MNTOPS}->{rw} = 0 if($line{MNTOPS}->{ro}); # e.g. mount_options="ro", super_options="rw" push @mountinfo, \%line; } # TRACE(Data::Dumper->Dump([\@mountinfo], ["mountinfo"])) if($do_dumper);