From 5d56c1eef7fd730a164c44a742ef2cb0afcfca8d Mon Sep 17 00:00:00 2001 From: Amin Hassani Date: Tue, 27 Oct 2020 15:44:33 -0700 Subject: update_engine: Remove ec_version and fw_version It seems like these values were set for devices like parrot that have been AUE'ed long time ago. The server side doesn't use this values and it doesn't seem we need them anywhere. So its better to not send them anymore since currently we're just sending empty values for them. BUG=b:171829801 TEST=FEATURES=test emerge-reef update_engine Change-Id: I2d2cd5f9d079ce5c87fc8167e30f91d1ffe1c87a Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2504454 Tested-by: Amin Hassani Reviewed-by: Jae Hoon Kim Reviewed-by: Tianjie Xu Commit-Queue: Amin Hassani --- common/utils.cc | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'common/utils.cc') diff --git a/common/utils.cc b/common/utils.cc index 9e1e6c58..c8924b1e 100644 --- a/common/utils.cc +++ b/common/utils.cc @@ -112,27 +112,6 @@ bool GetTempName(const string& path, base::FilePath* template_path) { namespace utils { -string ParseECVersion(string input_line) { - base::TrimWhitespaceASCII(input_line, base::TRIM_ALL, &input_line); - - // At this point we want to convert the format key=value pair from mosys to - // a vector of key value pairs. - vector> kv_pairs; - if (base::SplitStringIntoKeyValuePairs(input_line, '=', ' ', &kv_pairs)) { - for (const pair& kv_pair : kv_pairs) { - // Finally match against the fw_verion which may have quotes. - if (kv_pair.first == "fw_version") { - string output; - // Trim any quotes. - base::TrimString(kv_pair.second, "\"", &output); - return output; - } - } - } - LOG(ERROR) << "Unable to parse fwid from ec info."; - return ""; -} - bool WriteFile(const char* path, const void* data, size_t data_len) { int fd = HANDLE_EINTR(open(path, O_WRONLY | O_CREAT | O_TRUNC, 0600)); TEST_AND_RETURN_FALSE_ERRNO(fd >= 0); -- cgit v1.2.3