OSDN Git Service
(root)
/
android-x86
/
external-exfat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
074a8f0
)
Seek to the beginning of the device after detecting its size.
author
relan
<relan@users.noreply.github.com>
Sat, 29 Dec 2012 08:01:07 +0000
(08:01 +0000)
committer
relan
<relan@users.noreply.github.com>
Mon, 24 Aug 2015 05:26:15 +0000
(08:26 +0300)
dumpexfat relies on this.
libexfat/io.c
patch
|
blob
|
history
diff --git
a/libexfat/io.c
b/libexfat/io.c
index
886dd23
..
274dbef
100644
(file)
--- a/
libexfat/io.c
+++ b/
libexfat/io.c
@@
-176,6
+176,13
@@
struct exfat_dev* exfat_open(const char* spec, enum exfat_mode mode)
exfat_error("failed to get size of `%s'", spec);
return NULL;
}
+ if (exfat_seek(dev, 0, SEEK_SET) == -1)
+ {
+ close(dev->fd);
+ free(dev);
+ exfat_error("failed to seek to the beginning of `%s'", spec);
+ return NULL;
+ }
}
#ifdef USE_UBLIO