diff options
author | Ameya Thakur <ameyat@codeaurora.org> | 2013-07-10 14:35:50 -0700 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-07 17:39:54 -0700 |
commit | 0a594ebe91ee23985715263efccc13e5ec8eb8b4 (patch) | |
tree | 4ba5623573fdf50e90ef518395de77fbeadde977 | |
parent | c117549ff821d679778e23af7b25e22388d1f7c9 (diff) | |
download | android_external_fsck_msdos-0a594ebe91ee23985715263efccc13e5ec8eb8b4.tar.gz android_external_fsck_msdos-0a594ebe91ee23985715263efccc13e5ec8eb8b4.tar.bz2 android_external_fsck_msdos-0a594ebe91ee23985715263efccc13e5ec8eb8b4.zip |
Fix bug in writefat function
The readfat call returns 1 in case of success and 0 in case of failure.
writefat now correctly checks the return value of the call.
Change-Id: I95d09ec347ac5f2f751bb40a046f2567a1694422
-rw-r--r-- | fat.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -841,7 +841,7 @@ writefat(int fs, struct bootblock *boot, int correct_fat) break; } - if (_readfat(fs, boot, boot->ValidFat >= 0 ? boot->ValidFat :0, + if (!_readfat(fs, boot, boot->ValidFat >= 0 ? boot->ValidFat :0, &old_fat)) { free(buffer); return FSFATAL; |