X-Git-Url: https://git.sven.stormbind.net/?p=sven%2Ffuse-exfat.git;a=blobdiff_plain;f=libexfat%2Fmount.c;fp=libexfat%2Fmount.c;h=86fb84db2445f56615f965579e3cd69b04d536d7;hp=f0ca0e3dd635f6d5b2bf5438463b36b68bb25a8b;hb=aa03032454625361e1abc1cf80f4db0492ae5b81;hpb=b8b3f5e8940dd7a0ce964dfecd8c6c6139dab421 diff --git a/libexfat/mount.c b/libexfat/mount.c index f0ca0e3..86fb84d 100644 --- a/libexfat/mount.c +++ b/libexfat/mount.c @@ -3,7 +3,7 @@ exFAT file system implementation library. Free exFAT implementation. - Copyright (C) 2010-2018 Andrew Nayenko + Copyright (C) 2010-2023 Andrew Nayenko This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -198,7 +198,7 @@ int exfat_mount(struct exfat* ef, const char* spec, const char* options) mode = EXFAT_MODE_RW; ef->dev = exfat_open(spec, mode); if (ef->dev == NULL) - return -EIO; + return -ENODEV; if (exfat_get_mode(ef->dev) == EXFAT_MODE_RO) { if (mode == EXFAT_MODE_ANY) @@ -305,7 +305,7 @@ int exfat_mount(struct exfat* ef, const char* spec, const char* options) ef->root->start_cluster = le32_to_cpu(ef->sb->rootdir_cluster); ef->root->fptr_cluster = ef->root->start_cluster; ef->root->name[0] = cpu_to_le16('\0'); - ef->root->size = rootdir_size(ef); + ef->root->valid_size = ef->root->size = rootdir_size(ef); if (ef->root->size == 0) { exfat_free(ef);