X-Git-Url: https://git.sven.stormbind.net/?p=sven%2Fexfat-utils.git;a=blobdiff_plain;f=libexfat%2Fmount.c;h=f907f290eb41c4e7f985d7c12f6048025bd66169;hp=f1fb01a9a88c8ee20eb3730c6669ee905cfbfcd3;hb=refs%2Ftags%2Fupstream%2F1.2.6;hpb=9420cfdeee25e4d97e7fc6f7cbb286e5089caccb diff --git a/libexfat/mount.c b/libexfat/mount.c index f1fb01a..f907f29 100644 --- a/libexfat/mount.c +++ b/libexfat/mount.c @@ -3,7 +3,7 @@ exFAT file system implementation library. Free exFAT implementation. - Copyright (C) 2010-2015 Andrew Nayenko + Copyright (C) 2010-2017 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 @@ -287,7 +287,7 @@ int exfat_mount(struct exfat* ef, const char* spec, const char* options) return -ENOMEM; } memset(ef->root, 0, sizeof(struct exfat_node)); - ef->root->flags = EXFAT_ATTRIB_DIR; + ef->root->attrib = EXFAT_ATTRIB_DIR; 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'); @@ -359,7 +359,8 @@ static void finalize_super_block(struct exfat* ef) void exfat_unmount(struct exfat* ef) { - exfat_flush(ef); /* ignore return code */ + exfat_flush_nodes(ef); /* ignore return code */ + exfat_flush(ef); /* ignore return code */ exfat_put_node(ef, ef->root); exfat_reset_cache(ef); free(ef->root); @@ -375,5 +376,4 @@ void exfat_unmount(struct exfat* ef) ef->sb = NULL; free(ef->upcase); ef->upcase = NULL; - ef->upcase_chars = 0; }