Fixes to utility / unit test related code.
* Eliminated bugs related to reading content from pipes/files, including
general cleanup/refactoring of these code pieces and API.
* Eliminated bugs related binding/unbinding of loopback devices, which
are used in unit testing.
BUG=chromium-os:31082
TEST=Builds and runs unit tests
CQ-DEPEND=Ib7b3552e98ca40b6141688e2dea5a1407db12b2a
Change-Id: Ifaab8697602a35ce7d7fb9384fdcb1ca64b72515
Reviewed-on: https://gerrit.chromium.org/gerrit/27911
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Commit-Ready: Gilad Arnold <garnold@chromium.org>
diff --git a/omaha_request_params.cc b/omaha_request_params.cc
index 3733f10..e240c86 100644
--- a/omaha_request_params.cc
+++ b/omaha_request_params.cc
@@ -147,7 +147,7 @@
// TODO(adlr): make sure files checked are owned as root (and all their
// parents are recursively, too).
string file_data;
- if (!utils::ReadFileToString(root_ + *it, &file_data))
+ if (!utils::ReadFile(root_ + *it, &file_data))
continue;
map<string, string> data = simple_key_value_store::ParseString(file_data);