Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: src/platform/update_engine/utils.cc

Issue 1819002: AU: delta compress the kernel partition (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: fixes for review Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/update_engine/utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/update_engine/utils.cc
diff --git a/src/platform/update_engine/utils.cc b/src/platform/update_engine/utils.cc
index 724a4ba81e0733319340ff818f0a42bfcfd56e81..85d9e7db559d884414c7016d8fb2f763b08feffb 100644
--- a/src/platform/update_engine/utils.cc
+++ b/src/platform/update_engine/utils.cc
@@ -105,6 +105,15 @@ bool ReadFileToString(const std::string& path, std::string* out) {
return true;
}
+off_t FileSize(const string& path) {
+ struct stat stbuf;
+ int rc = stat(path.c_str(), &stbuf);
+ CHECK_EQ(rc, 0);
+ if (rc < 0)
+ return rc;
+ return stbuf.st_size;
+}
+
void HexDumpArray(const unsigned char* const arr, const size_t length) {
const unsigned char* const char_arr =
reinterpret_cast<const unsigned char* const>(arr);
« no previous file with comments | « src/platform/update_engine/utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698