diff options
author | Tom Marshall <tdm@cyngn.com> | 2016-02-12 15:49:55 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-03-08 11:14:22 -0800 |
commit | 1faa075303d57fada9f86984a60a97772d128b75 (patch) | |
tree | 7ae42414518022d555eecc2f66a15939be7fb964 | |
parent | 6c20b00105e405823aa3ec12479e52cc30c0df9c (diff) | |
download | bootable_recovery-1faa075303d57fada9f86984a60a97772d128b75.zip bootable_recovery-1faa075303d57fada9f86984a60a97772d128b75.tar.gz bootable_recovery-1faa075303d57fada9f86984a60a97772d128b75.tar.bz2 |
recovery: bu: Make 64-bit clean
Use lseek64 to determine file/block sizes
Change-Id: I5ae7b11d6cb612c84cb4be29d0e3fe1493b8e844
-rw-r--r-- | backup.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -47,7 +47,7 @@ static int append_sod(const char* opt_hash) volume_is_readonly(part->vol) || volume_is_verity(part->vol)) { int fd = open(part->vol->blk_device, O_RDONLY); - part->size = part->used = lseek(fd, 0, SEEK_END); + part->size = part->used = lseek64(fd, 0, SEEK_END); close(fd); } else { @@ -65,7 +65,7 @@ static int append_sod(const char* opt_hash) } else { int fd = open(part->vol->blk_device, O_RDONLY); - part->size = part->used = lseek(fd, 0, SEEK_END); + part->size = part->used = lseek64(fd, 0, SEEK_END); close(fd); } } @@ -182,7 +182,7 @@ static int tar_append_device_contents(TAR* t, const char* devname, const char* s logmsg("tar_append_device_contents: open %s failed\n", devname); return -1; } - st.st_size = lseek(fd, 0, SEEK_END); + st.st_size = lseek64(fd, 0, SEEK_END); close(fd); th_set_from_stat(t, &st); |