summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdk-stage1/NEWS2
-rw-r--r--mdk-stage1/tools.c11
2 files changed, 3 insertions, 10 deletions
diff --git a/mdk-stage1/NEWS b/mdk-stage1/NEWS
index 2899d7a9c..ef99b30f0 100644
--- a/mdk-stage1/NEWS
+++ b/mdk-stage1/NEWS
@@ -1,4 +1,6 @@
- mounting:
+ o let libblk guess the right fs type rather than manually trying a long list
+ of potential fses
o use regular mount tool rather than manual system calls
2.33
diff --git a/mdk-stage1/tools.c b/mdk-stage1/tools.c
index 78108d6a9..2e27688ea 100644
--- a/mdk-stage1/tools.c
+++ b/mdk-stage1/tools.c
@@ -208,21 +208,12 @@ enum return_type load_compressed_fd(int fd, int size)
return preload_mount_compressed_fd(fd, size, COMPRESSED_NAME(""), STAGE2_LOCATION);
}
-// FIXME: guess right module from partition type (using libblkid?)
int try_mount(char * dev, char * location)
{
char device_fullname[50];
snprintf(device_fullname, sizeof(device_fullname), "/dev/%s", dev);
- if (my_mount(device_fullname, location, "ext4", 0) == -1 &&
- my_mount(device_fullname, location, "btrfs", 0) == -1 &&
- my_mount(device_fullname, location, "vfat", 0) == -1 &&
- my_mount(device_fullname, location, "ntfs", 0) == -1 &&
- my_mount(device_fullname, location, "reiserfs", 0) == -1 &&
- my_mount(device_fullname, location, "reiser4", 0) == -1 &&
- my_mount(device_fullname, location, "jfs", 0) == -1 &&
- my_mount(device_fullname, location, "xfs", 0) == -1 &&
- my_mount(device_fullname, location, "iso9660", 0) == -1) {
+ if (my_mount(device_fullname, location, "auto", 0) == -1) {
return 1;
}