Change lseek to lseek64
Using lseek on 64-bit offset parameter caused failure
to write persistent data in crypto footer.
Changed calls to use lseek64 instead.
Change-Id: I4e4c397a6d36201b8b08be3017e17c9fac3b34e4
diff --git a/cryptfs.c b/cryptfs.c
index aaa2b86..0e7da2e 100644
--- a/cryptfs.c
+++ b/cryptfs.c
@@ -867,13 +867,13 @@
}
/* Write the new copy first, if successful, then erase the old copy */
- if (lseek(fd, write_offset, SEEK_SET) < 0) {
+ if (lseek64(fd, write_offset, SEEK_SET) < 0) {
SLOGE("Cannot seek to write persistent data");
goto err2;
}
if (unix_write(fd, persist_data, crypt_ftr.persist_data_size) ==
(int) crypt_ftr.persist_data_size) {
- if (lseek(fd, erase_offset, SEEK_SET) < 0) {
+ if (lseek64(fd, erase_offset, SEEK_SET) < 0) {
SLOGE("Cannot seek to erase previous persistent data");
goto err2;
}