diff -Nru exfat-1.2.6+20131130/.git/COMMIT_EDITMSG exfat-1.2.7+20140112/.git/COMMIT_EDITMSG --- exfat-1.2.6+20131130/.git/COMMIT_EDITMSG 2013-12-22 11:13:52.000000000 +0000 +++ exfat-1.2.7+20140112/.git/COMMIT_EDITMSG 2014-01-19 14:05:36.000000000 +0000 @@ -3,7 +3,9 @@ # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # On branch master -# Your branch is up-to-date with 'origin/master'. +# Your branch and 'origin/master' have diverged, +# and have 4 and 1 different commit each, respectively. +# (use "git pull" to merge the remote branch into yours) # # Changes to be committed: # new file: debian/changelog @@ -17,13 +19,3 @@ # new file: debian/exfat-kernel-source.prerm.in # new file: debian/rules # -# Untracked files: -# debian/dkms.conf -# debian/exfat-kernel-source.debhelper.log -# debian/exfat-kernel-source.install -# debian/exfat-kernel-source.postinst -# debian/exfat-kernel-source.prerm -# debian/exfat-kernel-source.substvars -# debian/exfat-kernel-source/ -# debian/files -# diff -Nru exfat-1.2.6+20131130/.git/FETCH_HEAD exfat-1.2.7+20140112/.git/FETCH_HEAD --- exfat-1.2.6+20131130/.git/FETCH_HEAD 1970-01-01 00:00:00.000000000 +0000 +++ exfat-1.2.7+20140112/.git/FETCH_HEAD 2014-01-19 13:56:38.000000000 +0000 @@ -0,0 +1 @@ +1691cdab52f1c716f3dc74afeeccb02f33324967 not-for-merge branch 'master' of https://github.com/dorimanx/exfat-nofuse diff -Nru exfat-1.2.6+20131130/.git/ORIG_HEAD exfat-1.2.7+20140112/.git/ORIG_HEAD --- exfat-1.2.6+20131130/.git/ORIG_HEAD 1970-01-01 00:00:00.000000000 +0000 +++ exfat-1.2.7+20140112/.git/ORIG_HEAD 2014-01-19 13:56:49.000000000 +0000 @@ -0,0 +1 @@ +f0ebb12327bce524be8bf17a9ac5871ff9ccee1d diff -Nru exfat-1.2.6+20131130/.git/config exfat-1.2.7+20140112/.git/config --- exfat-1.2.6+20131130/.git/config 2013-12-22 08:15:51.000000000 +0000 +++ exfat-1.2.7+20140112/.git/config 2014-01-19 13:56:31.000000000 +0000 @@ -4,8 +4,11 @@ bare = false logallrefupdates = true [remote "origin"] - url = https://github.com/eugenesan/exfat.git + url = git@github.com:eugenesan/exfat.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master +[remote "mainline"] + url = https://github.com/dorimanx/exfat-nofuse.git + fetch = +refs/heads/*:refs/remotes/mainline/* Binary files /tmp/StKIiPNZlN/exfat-1.2.6+20131130/.git/index and /tmp/PKo0207Akf/exfat-1.2.7+20140112/.git/index differ diff -Nru exfat-1.2.6+20131130/.git/logs/HEAD exfat-1.2.7+20140112/.git/logs/HEAD --- exfat-1.2.6+20131130/.git/logs/HEAD 2013-12-22 11:13:53.000000000 +0000 +++ exfat-1.2.7+20140112/.git/logs/HEAD 2014-01-19 14:05:39.000000000 +0000 @@ -1,2 +1,5 @@ -0000000000000000000000000000000000000000 f0ebb12327bce524be8bf17a9ac5871ff9ccee1d Eugene San (eugenesan) 1387700151 +0200 clone: from https://github.com/eugenesan/exfat.git -f0ebb12327bce524be8bf17a9ac5871ff9ccee1d bcab2d004df6db0078ade958e673968f1ea0867d Eugene San (eugenesan) 1387710832 +0200 commit (amend): Add debian packaging +0000000000000000000000000000000000000000 f0ebb12327bce524be8bf17a9ac5871ff9ccee1d Eugene San (eugenesan) 1390139669 +0200 clone: from git@github.com:eugenesan/exfat.git +f0ebb12327bce524be8bf17a9ac5871ff9ccee1d 1691cdab52f1c716f3dc74afeeccb02f33324967 Eugene San (eugenesan) 1390139809 +0200 rebase: checkout mainline/master +1691cdab52f1c716f3dc74afeeccb02f33324967 6d341de0c1cb12a7ebb14d06fe0e2b0dec92bb10 Eugene San (eugenesan) 1390139809 +0200 rebase: Add debian packaging +6d341de0c1cb12a7ebb14d06fe0e2b0dec92bb10 6d341de0c1cb12a7ebb14d06fe0e2b0dec92bb10 Eugene San (eugenesan) 1390139809 +0200 rebase finished: returning to refs/heads/master +6d341de0c1cb12a7ebb14d06fe0e2b0dec92bb10 72f5a8bfcf4552bb9c29dc83e407416083cdae1d Eugene San (eugenesan) 1390140336 +0200 commit (amend): Add debian packaging diff -Nru exfat-1.2.6+20131130/.git/logs/refs/heads/master exfat-1.2.7+20140112/.git/logs/refs/heads/master --- exfat-1.2.6+20131130/.git/logs/refs/heads/master 2013-12-22 11:13:53.000000000 +0000 +++ exfat-1.2.7+20140112/.git/logs/refs/heads/master 2014-01-19 14:05:39.000000000 +0000 @@ -1,2 +1,3 @@ -0000000000000000000000000000000000000000 f0ebb12327bce524be8bf17a9ac5871ff9ccee1d Eugene San (eugenesan) 1387700151 +0200 clone: from https://github.com/eugenesan/exfat.git -f0ebb12327bce524be8bf17a9ac5871ff9ccee1d bcab2d004df6db0078ade958e673968f1ea0867d Eugene San (eugenesan) 1387710832 +0200 commit (amend): Add debian packaging +0000000000000000000000000000000000000000 f0ebb12327bce524be8bf17a9ac5871ff9ccee1d Eugene San (eugenesan) 1390139669 +0200 clone: from git@github.com:eugenesan/exfat.git +f0ebb12327bce524be8bf17a9ac5871ff9ccee1d 6d341de0c1cb12a7ebb14d06fe0e2b0dec92bb10 Eugene San (eugenesan) 1390139809 +0200 rebase finished: refs/heads/master onto 1691cdab52f1c716f3dc74afeeccb02f33324967 +6d341de0c1cb12a7ebb14d06fe0e2b0dec92bb10 72f5a8bfcf4552bb9c29dc83e407416083cdae1d Eugene San (eugenesan) 1390140336 +0200 commit (amend): Add debian packaging diff -Nru exfat-1.2.6+20131130/.git/logs/refs/remotes/mainline/master exfat-1.2.7+20140112/.git/logs/refs/remotes/mainline/master --- exfat-1.2.6+20131130/.git/logs/refs/remotes/mainline/master 1970-01-01 00:00:00.000000000 +0000 +++ exfat-1.2.7+20140112/.git/logs/refs/remotes/mainline/master 2014-01-19 13:56:38.000000000 +0000 @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 1691cdab52f1c716f3dc74afeeccb02f33324967 Eugene Sanivsky 1390139798 +0200 fetch mainline: storing head diff -Nru exfat-1.2.6+20131130/.git/logs/refs/remotes/origin/HEAD exfat-1.2.7+20140112/.git/logs/refs/remotes/origin/HEAD --- exfat-1.2.6+20131130/.git/logs/refs/remotes/origin/HEAD 2013-12-22 08:15:51.000000000 +0000 +++ exfat-1.2.7+20140112/.git/logs/refs/remotes/origin/HEAD 2014-01-19 13:54:29.000000000 +0000 @@ -1 +1 @@ -0000000000000000000000000000000000000000 f0ebb12327bce524be8bf17a9ac5871ff9ccee1d Eugene San (eugenesan) 1387700151 +0200 clone: from https://github.com/eugenesan/exfat.git +0000000000000000000000000000000000000000 f0ebb12327bce524be8bf17a9ac5871ff9ccee1d Eugene San (eugenesan) 1390139669 +0200 clone: from git@github.com:eugenesan/exfat.git diff -Nru exfat-1.2.6+20131130/.git/logs/refs/remotes/origin/master exfat-1.2.7+20140112/.git/logs/refs/remotes/origin/master --- exfat-1.2.6+20131130/.git/logs/refs/remotes/origin/master 1970-01-01 00:00:00.000000000 +0000 +++ exfat-1.2.7+20140112/.git/logs/refs/remotes/origin/master 2014-01-19 14:06:40.000000000 +0000 @@ -0,0 +1 @@ +f0ebb12327bce524be8bf17a9ac5871ff9ccee1d 72f5a8bfcf4552bb9c29dc83e407416083cdae1d Eugene San (eugenesan) 1390140400 +0200 update by push Binary files /tmp/StKIiPNZlN/exfat-1.2.6+20131130/.git/objects/03/7667f520996f1000b79aab5ac7677350d1461f and /tmp/PKo0207Akf/exfat-1.2.7+20140112/.git/objects/03/7667f520996f1000b79aab5ac7677350d1461f differ Binary files /tmp/StKIiPNZlN/exfat-1.2.6+20131130/.git/objects/16/91cdab52f1c716f3dc74afeeccb02f33324967 and /tmp/PKo0207Akf/exfat-1.2.7+20140112/.git/objects/16/91cdab52f1c716f3dc74afeeccb02f33324967 differ Binary files /tmp/StKIiPNZlN/exfat-1.2.6+20131130/.git/objects/28/bfa2d6f445b51b17107434dcb50f682e381a13 and /tmp/PKo0207Akf/exfat-1.2.7+20140112/.git/objects/28/bfa2d6f445b51b17107434dcb50f682e381a13 differ Binary files /tmp/StKIiPNZlN/exfat-1.2.6+20131130/.git/objects/2b/d15ab97f65f8a7594fd07fc548824b2ccaf29d and /tmp/PKo0207Akf/exfat-1.2.7+20140112/.git/objects/2b/d15ab97f65f8a7594fd07fc548824b2ccaf29d differ Binary files /tmp/StKIiPNZlN/exfat-1.2.6+20131130/.git/objects/41/47d3060a357fb9da46222cfaeda9619b492923 and /tmp/PKo0207Akf/exfat-1.2.7+20140112/.git/objects/41/47d3060a357fb9da46222cfaeda9619b492923 differ Binary files /tmp/StKIiPNZlN/exfat-1.2.6+20131130/.git/objects/56/0c5e880bc94fa5536d30d4ef419ae965b28a08 and /tmp/PKo0207Akf/exfat-1.2.7+20140112/.git/objects/56/0c5e880bc94fa5536d30d4ef419ae965b28a08 differ Binary files /tmp/StKIiPNZlN/exfat-1.2.6+20131130/.git/objects/5c/2e3b430360a3af4b10385bf398c6500d740ea0 and /tmp/PKo0207Akf/exfat-1.2.7+20140112/.git/objects/5c/2e3b430360a3af4b10385bf398c6500d740ea0 differ Binary files /tmp/StKIiPNZlN/exfat-1.2.6+20131130/.git/objects/6d/341de0c1cb12a7ebb14d06fe0e2b0dec92bb10 and /tmp/PKo0207Akf/exfat-1.2.7+20140112/.git/objects/6d/341de0c1cb12a7ebb14d06fe0e2b0dec92bb10 differ diff -Nru exfat-1.2.6+20131130/.git/objects/6d/8d32e6971ee28c0f7b4aec27da588702ffc7fe exfat-1.2.7+20140112/.git/objects/6d/8d32e6971ee28c0f7b4aec27da588702ffc7fe --- exfat-1.2.6+20131130/.git/objects/6d/8d32e6971ee28c0f7b4aec27da588702ffc7fe 1970-01-01 00:00:00.000000000 +0000 +++ exfat-1.2.7+20140112/.git/objects/6d/8d32e6971ee28c0f7b4aec27da588702ffc7fe 2014-01-19 14:05:32.000000000 +0000 @@ -0,0 +1,2 @@ +xQMO1_1c W@(Tn$Dmm7m@ v ŋ63yoff0]-l$l25)asGQ8`.4 2!t)k4 aui%~Zt"m>b NyC}e/XQ>uGM:ɠl*Ixͅ܊|ΠVNn(D-Bkv#6-d=הIpWV!en +Ɏ x /iϞYi!9ASh!ֹyUz{騶"pa߃)A9Ea!!0?}  \ No newline at end of file diff -Nru exfat-1.2.6+20131130/.git/objects/72/f5a8bfcf4552bb9c29dc83e407416083cdae1d exfat-1.2.7+20140112/.git/objects/72/f5a8bfcf4552bb9c29dc83e407416083cdae1d --- exfat-1.2.6+20131130/.git/objects/72/f5a8bfcf4552bb9c29dc83e407416083cdae1d 1970-01-01 00:00:00.000000000 +0000 +++ exfat-1.2.7+20140112/.git/objects/72/f5a8bfcf4552bb9c29dc83e407416083cdae1d 2014-01-19 14:05:39.000000000 +0000 @@ -0,0 +1,2 @@ +xAJ1E])j9"HU*L@]xOPTffopy<ݷm3Ф9YzV ]{tZ +H]%*^jFW4rŚ48/K{?~]6Yu.@#]r OȈXGm{G0£GR @o@gw}oIDOq'UPkq%Z RS0 \ No newline at end of file Binary files /tmp/StKIiPNZlN/exfat-1.2.6+20131130/.git/objects/be/5cc16df5e91da53f98fe9448a8632cdac18120 and /tmp/PKo0207Akf/exfat-1.2.7+20140112/.git/objects/be/5cc16df5e91da53f98fe9448a8632cdac18120 differ Binary files /tmp/StKIiPNZlN/exfat-1.2.6+20131130/.git/objects/c9/9897f15b06263db1e340998f60563bb1b90ca7 and /tmp/PKo0207Akf/exfat-1.2.7+20140112/.git/objects/c9/9897f15b06263db1e340998f60563bb1b90ca7 differ Binary files /tmp/StKIiPNZlN/exfat-1.2.6+20131130/.git/objects/c9/cb911d1485c0f42c0944ab3ef10294f441a667 and /tmp/PKo0207Akf/exfat-1.2.7+20140112/.git/objects/c9/cb911d1485c0f42c0944ab3ef10294f441a667 differ diff -Nru exfat-1.2.6+20131130/.git/objects/db/44ffdc3dc82ef2fb764ada72ba65e994131ffb exfat-1.2.7+20140112/.git/objects/db/44ffdc3dc82ef2fb764ada72ba65e994131ffb --- exfat-1.2.6+20131130/.git/objects/db/44ffdc3dc82ef2fb764ada72ba65e994131ffb 2013-12-22 11:13:45.000000000 +0000 +++ exfat-1.2.7+20140112/.git/objects/db/44ffdc3dc82ef2fb764ada72ba65e994131ffb 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -xQN1ܯ1ЅѸQ"HKn;%nwE6^3m3pKQVdMBdґuTes.4[2UXx7hRam~t$m1ai%NyηCF]YMZg,(,G]nA4|v{r^X%4 [η j[7ldNUR!fgˏLNx&S﹦Lrg)/sȞYkU[+ZHwj^2/6$ - GC|(G&rP~'ҶG/# \ No newline at end of file diff -Nru exfat-1.2.6+20131130/.git/objects/e6/737d892e5f8930e166bd2ff3609520da74ee69 exfat-1.2.7+20140112/.git/objects/e6/737d892e5f8930e166bd2ff3609520da74ee69 --- exfat-1.2.6+20131130/.git/objects/e6/737d892e5f8930e166bd2ff3609520da74ee69 1970-01-01 00:00:00.000000000 +0000 +++ exfat-1.2.7+20140112/.git/objects/e6/737d892e5f8930e166bd2ff3609520da74ee69 2014-01-19 14:05:32.000000000 +0000 @@ -0,0 +1 @@ +x=ʽ0agA4DAW@IiF{ۓ7oo}F#GTXRB i ,x8 [,b,qO%!oV@ZQ :ںNi/, \ No newline at end of file Binary files /tmp/StKIiPNZlN/exfat-1.2.6+20131130/.git/objects/ee/a339ba4a3c4eb813b941398cc1224cc6b92f46 and /tmp/PKo0207Akf/exfat-1.2.7+20140112/.git/objects/ee/a339ba4a3c4eb813b941398cc1224cc6b92f46 differ Binary files /tmp/StKIiPNZlN/exfat-1.2.6+20131130/.git/objects/ef/b7b8ac06993bedb4e6bf1c9442a7dadb28ea58 and /tmp/PKo0207Akf/exfat-1.2.7+20140112/.git/objects/ef/b7b8ac06993bedb4e6bf1c9442a7dadb28ea58 differ Binary files /tmp/StKIiPNZlN/exfat-1.2.6+20131130/.git/objects/pack/pack-267860c497b34130c4b0a74e21c8411ebe234fd5.idx and /tmp/PKo0207Akf/exfat-1.2.7+20140112/.git/objects/pack/pack-267860c497b34130c4b0a74e21c8411ebe234fd5.idx differ Binary files /tmp/StKIiPNZlN/exfat-1.2.6+20131130/.git/objects/pack/pack-267860c497b34130c4b0a74e21c8411ebe234fd5.pack and /tmp/PKo0207Akf/exfat-1.2.7+20140112/.git/objects/pack/pack-267860c497b34130c4b0a74e21c8411ebe234fd5.pack differ diff -Nru exfat-1.2.6+20131130/.git/refs/heads/master exfat-1.2.7+20140112/.git/refs/heads/master --- exfat-1.2.6+20131130/.git/refs/heads/master 2013-12-22 11:13:53.000000000 +0000 +++ exfat-1.2.7+20140112/.git/refs/heads/master 2014-01-19 14:05:39.000000000 +0000 @@ -1 +1 @@ -bcab2d004df6db0078ade958e673968f1ea0867d +72f5a8bfcf4552bb9c29dc83e407416083cdae1d diff -Nru exfat-1.2.6+20131130/.git/refs/remotes/mainline/master exfat-1.2.7+20140112/.git/refs/remotes/mainline/master --- exfat-1.2.6+20131130/.git/refs/remotes/mainline/master 1970-01-01 00:00:00.000000000 +0000 +++ exfat-1.2.7+20140112/.git/refs/remotes/mainline/master 2014-01-19 13:56:38.000000000 +0000 @@ -0,0 +1 @@ +1691cdab52f1c716f3dc74afeeccb02f33324967 diff -Nru exfat-1.2.6+20131130/.git/refs/remotes/origin/master exfat-1.2.7+20140112/.git/refs/remotes/origin/master --- exfat-1.2.6+20131130/.git/refs/remotes/origin/master 1970-01-01 00:00:00.000000000 +0000 +++ exfat-1.2.7+20140112/.git/refs/remotes/origin/master 2014-01-19 14:06:40.000000000 +0000 @@ -0,0 +1 @@ +72f5a8bfcf4552bb9c29dc83e407416083cdae1d diff -Nru exfat-1.2.6+20131130/Makefile exfat-1.2.7+20140112/Makefile --- exfat-1.2.6+20131130/Makefile 2013-12-22 11:19:49.000000000 +0000 +++ exfat-1.2.7+20140112/Makefile 2014-01-19 13:56:49.000000000 +0000 @@ -15,9 +15,21 @@ EXTRA_FLAGS += -I$(PWD) -#KDIR := /usr/src/linux/ +# +# KDIR is a path to a directory containing kernel source. +# It can be specified on the command line passed to make to enable the module to +# be built and installed for a kernel other than the one currently running. +# By default it is the path to the symbolic link created when +# the current kernel's modules were installed, but +# any valid path to the directory in which the target kernel's source is located +# can be provided on the command line. +# KDIR := /lib/modules/$(shell uname -r)/build -PWD := $(shell pwd) +MDIR := /lib/modules/$(shell uname -r) +PWD := $(shell pwd) +KREL := $(shell cd ${KDIR} && make -s kernelrelease) +MDIR := /lib/modules/${KREL} +PWD := $(shell pwd) export CONFIG_EXFAT_FS := m @@ -31,12 +43,12 @@ $(MAKE) -C $(KDIR) M=$(PWD) help install: exfat.ko - rm -f ${KDIR}/../kernel/fs/exfat/exfat.ko - install -m644 -b -D exfat.ko ${KDIR}/../kernel/fs/exfat/exfat.ko + rm -f ${MDIR}/kernel/fs/exfat/exfat.ko + install -m644 -b -D exfat.ko ${MDIR}/kernel/fs/exfat/exfat.ko depmod -aq uninstall: - rm -rf ${KDIR}/../kernel/fs/exfat + rm -rf ${MDIR}/kernel/fs/exfat depmod -aq endif diff -Nru exfat-1.2.6+20131130/debian/changelog exfat-1.2.7+20140112/debian/changelog --- exfat-1.2.6+20131130/debian/changelog 2013-12-22 11:21:53.000000000 +0000 +++ exfat-1.2.7+20140112/debian/changelog 2014-01-19 14:10:26.000000000 +0000 @@ -1,5 +1,5 @@ -exfat (1.2.6+20131130-0~eugenesan~raring1) raring; urgency=low +exfat (1.2.7+20140112-0~eugenesan~raring1) raring; urgency=low * Initial release - -- Eugene San (eugenesan) Sun, 22 Dec 2013 03:20:00 +0300 + -- Eugene San (eugenesan) Sun, 19 Jan 2014 16:01:49 +0200 diff -Nru exfat-1.2.6+20131130/debian/control exfat-1.2.7+20140112/debian/control --- exfat-1.2.6+20131130/debian/control 2013-12-22 11:19:49.000000000 +0000 +++ exfat-1.2.7+20140112/debian/control 2014-01-19 14:03:11.000000000 +0000 @@ -9,6 +9,7 @@ Architecture: all Depends: ${misc:Depends}, dkms, linux-libc-dev, libc6-dev XB-Modaliases: ${modaliases} +Recommends: exfat-utils Conflicts: exfat-modaliases Replaces: exfat-modaliases, exfat-fuse Description: exFAT & FAT12/16/32 File System driver source diff -Nru exfat-1.2.6+20131130/exfat_core.c exfat-1.2.7+20140112/exfat_core.c --- exfat-1.2.6+20131130/exfat_core.c 2013-12-22 11:19:49.000000000 +0000 +++ exfat-1.2.7+20140112/exfat_core.c 2014-01-19 13:56:49.000000000 +0000 @@ -596,6 +596,8 @@ num_alloced = p_fs->fs_func->alloc_cluster(sb, num_alloc, &new_clu); if (num_alloced == 0) break; + else if (num_alloced < 0) + return FFS_MEDIAERR; /* (2) append to the FAT chain */ if (last_clu == CLUSTER_32(~0)) { @@ -1334,7 +1336,9 @@ /* (1) allocate a cluster */ num_alloced = p_fs->fs_func->alloc_cluster(sb, 1, &new_clu); - if (num_alloced < 1) + if (num_alloced < 0) + return FFS_MEDIAERR; + else if (num_alloced == 0) return FFS_FULL; /* (2) append to the FAT chain */ @@ -1805,16 +1809,19 @@ for (i = 2; i < p_fs->num_clusters; i++) { if (FAT_read(sb, new_clu, &read_clu) != 0) - return 0; + return -1; if (read_clu == CLUSTER_32(0)) { - FAT_write(sb, new_clu, CLUSTER_32(~0)); + if (FAT_write(sb, new_clu, CLUSTER_32(~0)) < 0) + return -1; num_clusters++; if (p_chain->dir == CLUSTER_32(~0)) p_chain->dir = new_clu; - else - FAT_write(sb, last_clu, new_clu); + else { + if (FAT_write(sb, last_clu, new_clu) < 0) + return -1; + } last_clu = new_clu; @@ -1866,18 +1873,22 @@ } if (set_alloc_bitmap(sb, new_clu-2) != FFS_SUCCESS) - return 0; + return -1; num_clusters++; - if (p_chain->flags == 0x01) - FAT_write(sb, new_clu, CLUSTER_32(~0)); + if (p_chain->flags == 0x01) { + if (FAT_write(sb, new_clu, CLUSTER_32(~0)) < 0) + return -1; + } if (p_chain->dir == CLUSTER_32(~0)) { p_chain->dir = new_clu; } else { - if (p_chain->flags == 0x01) - FAT_write(sb, last_clu, new_clu); + if (p_chain->flags == 0x01) { + if (FAT_write(sb, last_clu, new_clu) < 0) + return -1; + } } last_clu = new_clu; @@ -1939,7 +1950,8 @@ if (FAT_read(sb, clu, &clu) == -1) break; - FAT_write(sb, prev, CLUSTER_32(0)); + if (FAT_write(sb, prev, CLUSTER_32(0)) < 0) + break; num_clusters++; } while (clu != CLUSTER_32(~0)); @@ -2097,7 +2109,8 @@ return; while (len > 1) { - FAT_write(sb, chain, chain+1); + if (FAT_write(sb, chain, chain+1) < 0) + break; chain++; len--; } @@ -3606,7 +3619,8 @@ p_fs->hint_uentry.clu.flags = 0x01; } if (clu.flags == 0x01) - FAT_write(sb, last_clu, clu.dir); + if (FAT_write(sb, last_clu, clu.dir) < 0) + return -1; if (p_fs->hint_uentry.entry == -1) { p_fs->hint_uentry.dir = p_dir->dir; @@ -4674,7 +4688,9 @@ /* (1) allocate a cluster */ ret = p_fs->fs_func->alloc_cluster(sb, 1, &clu); - if (ret < 1) + if (ret < 0) + return FFS_MEDIAERR; + else if (ret == 0) return FFS_FULL; ret = clear_cluster(sb, clu.dir); diff -Nru exfat-1.2.6+20131130/exfat_super.c exfat-1.2.7+20140112/exfat_super.c --- exfat-1.2.6+20131130/exfat_super.c 2013-12-22 11:19:49.000000000 +0000 +++ exfat-1.2.7+20140112/exfat_super.c 2014-01-19 13:56:49.000000000 +0000 @@ -1781,7 +1781,7 @@ info.FreeClusters = info.NumClusters - info.UsedClusters; if (p_fs->dev_ejected) - return -EIO; + printk("[EXFAT] statfs on device is ejected\n"); } buf->f_type = sb->s_magic; diff -Nru exfat-1.2.6+20131130/exfat_version.h exfat-1.2.7+20140112/exfat_version.h --- exfat-1.2.6+20131130/exfat_version.h 2013-12-22 11:19:49.000000000 +0000 +++ exfat-1.2.7+20140112/exfat_version.h 2014-01-19 13:56:49.000000000 +0000 @@ -16,4 +16,4 @@ /* */ /************************************************************************/ -#define EXFAT_VERSION "1.2.6" +#define EXFAT_VERSION "1.2.7"