mirror of
https://github.com/speed47/btrfs-list
synced 2024-09-30 04:43:31 +00:00
feat: add btrfs-progs v5.10.1 bug workaround
This commit is contained in:
parent
d2a9bb2548
commit
befde74faa
|
@ -140,6 +140,8 @@ GetOptions(
|
|||
'd|deleted' => \my $opt_deleted,
|
||||
) or die "FATAL: Error parsing arguments, aborting\n";
|
||||
|
||||
$opt_quiet ||= 0;
|
||||
|
||||
sub debug {
|
||||
return if !$opt_debug;
|
||||
print STDERR $_ . "\n" for @_;
|
||||
|
@ -557,6 +559,11 @@ foreach (@fishow) {
|
|||
if (not exists $filesystems{$fuuid}) {
|
||||
$filesystems{$fuuid} = {uuid => $fuuid, label => $label, devices => [], devinfo => {}};
|
||||
}
|
||||
# btrfs-progs v5.10.1 bug workaround: "dm-X" instead of "/dev/dm-X"
|
||||
if ($dev && $dev =~ m{^dm-}) {
|
||||
debug("Applying workaround $dev => /dev/$dev");
|
||||
$dev = "/dev/$dev";
|
||||
}
|
||||
if (-l $dev) {
|
||||
$dev = link2real($dev);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue