summaryrefslogtreecommitdiffstats
path: root/rescue/bin/guessmounts
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-03-19 14:33:39 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-03-19 15:45:44 +0100
commitc2fcfde5b3064845d96f7cb29ddc27689ea6e710 (patch)
treeda015fa26a0ea71e324b8291882645af3422b736 /rescue/bin/guessmounts
parenta0a77f7a19ee6380e347c4219b5653d71ed1e060 (diff)
downloaddrakx-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()
Diffstat (limited to 'rescue/bin/guessmounts')
-rwxr-xr-xrescue/bin/guessmounts6
1 files changed, 3 insertions, 3 deletions
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"));