summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Landström <bjorn.landstrom.x@sonymobile.com>2015-01-20 12:43:56 +0100
committerLin Ma <lma@cyngn.com>2015-09-18 10:09:08 -0700
commit2462460f1bc26597431efa04cd6612e2c3b16bbf (patch)
tree290406e25f458d529a6727015d3c19a8641bc924
parentb5859a758d9cc9a4558ae11d2751e3fc22ae6bc0 (diff)
downloadandroid_system_vold-2462460f1bc26597431efa04cd6612e2c3b16bbf.tar.gz
android_system_vold-2462460f1bc26597431efa04cd6612e2c3b16bbf.tar.bz2
android_system_vold-2462460f1bc26597431efa04cd6612e2c3b16bbf.zip
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. RENDANG-490 Change-Id: I4e4c397a6d36201b8b08be3017e17c9fac3b34e4 (cherry picked from commit e8ac8927fc16f75fb12dff727ec98f23167039fb)
-rwxr-xr-xcryptfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cryptfs.c b/cryptfs.c
index a60d513..880ac53 100755
--- a/cryptfs.c
+++ b/cryptfs.c
@@ -895,13 +895,13 @@ static int save_persistent_data(void)
}
/* 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;
}