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
This commit is contained in:
parent
f3b2637e06
commit
96dbee7bd6
1 changed files with 2 additions and 2 deletions
|
@ -867,13 +867,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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue