From 1faa075303d57fada9f86984a60a97772d128b75 Mon Sep 17 00:00:00 2001 From: Tom Marshall Date: Fri, 12 Feb 2016 15:49:55 -0800 Subject: recovery: bu: Make 64-bit clean Use lseek64 to determine file/block sizes Change-Id: I5ae7b11d6cb612c84cb4be29d0e3fe1493b8e844 --- backup.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backup.cpp b/backup.cpp index 5849490..7792add 100644 --- a/backup.cpp +++ b/backup.cpp @@ -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); -- cgit v1.1