Skip to content

Commit

Permalink
recovery: bu: Make 64-bit clean
Browse files Browse the repository at this point in the history
Use lseek64 to determine file/block sizes

Change-Id: I5ae7b11d6cb612c84cb4be29d0e3fe1493b8e844
  • Loading branch information
tdmcyngn authored and Steve Kondik committed Sep 4, 2016
1 parent 113a554 commit 05b793a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,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 {
Expand All @@ -63,7 +63,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);
}
}
Expand Down Expand Up @@ -180,7 +180,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);
Expand Down

0 comments on commit 05b793a

Please sign in to comment.