diff options
author | relan <relan@users.noreply.github.com> | 2015-07-11 13:04:51 +0300 |
---|---|---|
committer | relan <relan@users.noreply.github.com> | 2015-08-24 08:36:19 +0300 |
commit | fcba4d92e7a78feb263f8ee0374ec5277341cdd3 (patch) | |
tree | 9e81a29c4a31fb7afcf5d50607b1c323b931b68d | |
parent | 8c4c5fabc4f571fbb3e2ae6429958be8a4d62807 (diff) | |
download | android_external_exfat-fcba4d92e7a78feb263f8ee0374ec5277341cdd3.tar.gz android_external_exfat-fcba4d92e7a78feb263f8ee0374ec5277341cdd3.tar.bz2 android_external_exfat-fcba4d92e7a78feb263f8ee0374ec5277341cdd3.zip |
Turn "FS is larger than device" error into warning.
After formatting a memory card in a Panasonic Lumix DMC TZ-40 camera the
FS appears to be 512 bytes larger than underlying device size. This makes
the last cluster unaccessible. Not a big deal.
-rw-r--r-- | libexfat/mount.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libexfat/mount.c b/libexfat/mount.c index 6e7881c..7ccdd4e 100644 --- a/libexfat/mount.c +++ b/libexfat/mount.c @@ -253,14 +253,12 @@ int exfat_mount(struct exfat* ef, const char* spec, const char* options) if (le64_to_cpu(ef->sb->sector_count) * SECTOR_SIZE(*ef->sb) > exfat_get_size(ef->dev)) { - free(ef->zero_cluster); - exfat_error("file system is larger than underlying device: " + /* this can cause I/O errors later but we don't fail mounting to let + user rescue data */ + exfat_warn("file system is larger than underlying device: " "%"PRIu64" > %"PRIu64, le64_to_cpu(ef->sb->sector_count) * SECTOR_SIZE(*ef->sb), exfat_get_size(ef->dev)); - exfat_close(ef->dev); - free(ef->sb); - return -EIO; } ef->root = malloc(sizeof(struct exfat_node)); |