disk.c, mount.c: Add support exfat

This commit is contained in:
Anton Midyukov 2021-03-23 12:08:02 +07:00
parent b4c8144c03
commit ae2901d290
2 changed files with 7 additions and 1 deletions

3
disk.c
View File

@ -265,9 +265,10 @@ static enum return_type try_with_partition(char *choice)
my_mount(device_fullname, IMAGE_LOCATION, "ext3", 0) == -1 &&
my_mount(device_fullname, IMAGE_LOCATION, "ext4", 0) == -1 &&
my_mount(device_fullname, IMAGE_LOCATION, "vfat", 0) == -1 &&
my_mount(device_fullname, IMAGE_LOCATION, "exfat", 0) == -1 &&
my_mount(device_fullname, IMAGE_LOCATION, "reiserfs", 0) == -1 &&
my_mount(device_fullname, IMAGE_LOCATION, "ntfs", 0) == -1) {
stg1_error_message("I can't find a valid filesystem (tried: ext2, ext3, ext4, vfat, ntfs, iso9660, reiserfs).");
stg1_error_message("I can't find a valid filesystem (tried: ext2, ext3, ext4, vfat, exfat, ntfs, iso9660, reiserfs).");
return RETURN_ERROR;
}

View File

@ -285,6 +285,11 @@ int my_mount(char *dev, char *location, char *fs, int force_rw)
opts = "check=relaxed";
}
if (!strcmp(fs, "exfat")) {
my_insmod("exfat", NULL);
opts = "check=relaxed";
}
if (!strcmp(fs, "ntfs"))
my_insmod("ntfs", NULL);