summaryrefslogtreecommitdiff
path: root/verity
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2018-08-01 17:06:01 -0700
committerTianjie Xu <xunchang@google.com>2018-08-02 23:09:05 +0000
commit89eaba1637b440626fa75480b2456f18076bd348 (patch)
tree69ea2b9d346afddf392dfc23c45895f43915da32 /verity
parent8d81763715bc681243955d831cc36dd2ea2998b7 (diff)
downloadextras-89eaba1637b440626fa75480b2456f18076bd348.tar.gz
Change the interface parameter from off_t to uint64_t
Therefore, users won't need to set the FILE_OFFSET_BITS=64 Test: unit tests pass Change-Id: I6dbd756d598ee16282b10ae554ca852d61a6b809
Diffstat (limited to 'verity')
-rw-r--r--verity/hash_tree_builder.cpp2
-rw-r--r--verity/include/verity/hash_tree_builder.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/verity/hash_tree_builder.cpp b/verity/hash_tree_builder.cpp
index 27909255..c5d64f87 100644
--- a/verity/hash_tree_builder.cpp
+++ b/verity/hash_tree_builder.cpp
@@ -230,7 +230,7 @@ bool HashTreeBuilder::WriteHashTreeToFile(const std::string& output) const {
return WriteHashTreeToFd(output_fd, 0);
}
-bool HashTreeBuilder::WriteHashTreeToFd(int fd, off_t offset) const {
+bool HashTreeBuilder::WriteHashTreeToFd(int fd, uint64_t offset) const {
CHECK(!verity_tree_.empty());
if (lseek(fd, offset, SEEK_SET) != offset) {
diff --git a/verity/include/verity/hash_tree_builder.h b/verity/include/verity/hash_tree_builder.h
index d933b488..333e5b9d 100644
--- a/verity/include/verity/hash_tree_builder.h
+++ b/verity/include/verity/hash_tree_builder.h
@@ -48,7 +48,7 @@ class HashTreeBuilder {
bool BuildHashTree();
// Writes the computed hash tree top-down to |output|.
bool WriteHashTreeToFile(const std::string& output) const;
- bool WriteHashTreeToFd(int fd, off_t offset) const;
+ bool WriteHashTreeToFd(int fd, uint64_t offset) const;
size_t hash_size() const { return hash_size_; }
const std::vector<unsigned char>& root_hash() const { return root_hash_; }