diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-03-19 14:33:39 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-03-19 15:45:44 +0100 |
commit | c2fcfde5b3064845d96f7cb29ddc27689ea6e710 (patch) | |
tree | da015fa26a0ea71e324b8291882645af3422b736 | |
parent | a0a77f7a19ee6380e347c4219b5653d71ed1e060 (diff) | |
download | drakx-c2fcfde5b3064845d96f7cb29ddc27689ea6e710.tar drakx-c2fcfde5b3064845d96f7cb29ddc27689ea6e710.tar.gz drakx-c2fcfde5b3064845d96f7cb29ddc27689ea6e710.tar.bz2 drakx-c2fcfde5b3064845d96f7cb29ddc27689ea6e710.tar.xz drakx-c2fcfde5b3064845d96f7cb29ddc27689ea6e710.zip |
just use the fs reported by blkid
Instead of doing brute force guessing.
Thus making logs easier to read…
Also slightly faster and less error-prone (even if no true FS should
havoc on another fs type).
We could have fallbacked on ->{fs_type_from_magic} but that would only
help iso9660 & the like which are not true FSes such as tested
previously by fs::type::true_local_fs_types()
-rw-r--r-- | rescue/NEWS | 3 | ||||
-rwxr-xr-x | rescue/bin/guessmounts | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/rescue/NEWS b/rescue/NEWS index f3f4f4c47..381194815 100644 --- a/rescue/NEWS +++ b/rescue/NEWS @@ -1,3 +1,6 @@ +- guessmount: + o just use the fs reported by blkid instead of doing brute force guessing + Version 1.63 - 19 March 2020 by Thierry Vignaud - add more tools for XFS & btrfs diff --git a/rescue/bin/guessmounts b/rescue/bin/guessmounts index 07cd62ba3..a4d1fa7f7 100755 --- a/rescue/bin/guessmounts +++ b/rescue/bin/guessmounts @@ -62,9 +62,9 @@ my $arch = arch() =~ /i.86/ ? $MDK::Common::System::compat_arch{arch()} : arch() foreach (@$normal_parts) { my $dev = devices::make($_->{device}); - my $fs = find { - system("mount -t $_ $dev $target 2>/dev/null") == 0; - } fs::type::true_local_fs_types() or next; + my $fs = $_->{fs_type}; + $fs or next; # no need to display an error if there's no fs... + system("mount -t $fs $dev $target 2>/dev/null"); if (my $release_file = common::release_file($target)) { my $release = chomp_(cat_("$target$release_file")); |