mirror of https://github.com/digint/btrbk
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.pull/299/head
parent
8570ee585d
commit
8434c6881c
4
btrbk
4
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);
|
||||
|
|
Loading…
Reference in New Issue