From 85f2bc930ae57abdf27c6ffea6d90091e3f22ae3 Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Fri, 10 Apr 2020 10:15:30 -0700 Subject: [PATCH] Cleanup some trivial TODOs. 1) There's no reason or way to support boot_clock for waiting for property changes, since the underlying futex_wait uses CLOCK_MONOTONIC. We probably wouldn't want boot_clock even if it did, since it doesn't make sense to consider the time a device was suspending in the timeout for waiting for a property to change. 2) The init tokenizer has been essentially unchanged for a decade, there's no motivation to 'fix' it to not require a trailing newline. 3) The ueventd TODO regarding moving vendor specific ueventd.rc entries out of rootdir has been fixed. Test: n/a Change-Id: I3b68e3d2f25cbd539f9f8ff526669b8af04d833d --- base/properties.cpp | 1 - init/parser.cpp | 2 +- init/tokenizer_test.cpp | 2 +- init/ueventd.cpp | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/base/properties.cpp b/base/properties.cpp index 35e41a86e..5c9ec7e9c 100644 --- a/base/properties.cpp +++ b/base/properties.cpp @@ -133,7 +133,6 @@ static void DurationToTimeSpec(timespec& ts, const std::chrono::milliseconds d) ts.tv_nsec = ns.count(); } -// TODO: boot_clock? using AbsTime = std::chrono::time_point; static void UpdateTimeSpec(timespec& ts, std::chrono::milliseconds relative_timeout, diff --git a/init/parser.cpp b/init/parser.cpp index 507ee4a5b..5c18551e1 100644 --- a/init/parser.cpp +++ b/init/parser.cpp @@ -41,7 +41,7 @@ void Parser::AddSingleLineParser(const std::string& prefix, LineCallback callbac } void Parser::ParseData(const std::string& filename, std::string* data) { - data->push_back('\n'); // TODO: fix tokenizer + data->push_back('\n'); data->push_back('\0'); parse_state state; diff --git a/init/tokenizer_test.cpp b/init/tokenizer_test.cpp index 6b31683e0..012288458 100644 --- a/init/tokenizer_test.cpp +++ b/init/tokenizer_test.cpp @@ -28,7 +28,7 @@ namespace { void RunTest(const std::string& data, const std::vector>& expected_tokens) { auto data_copy = std::string{data}; - data_copy.push_back('\n'); // TODO: fix tokenizer + data_copy.push_back('\n'); data_copy.push_back('\0'); parse_state state; diff --git a/init/ueventd.cpp b/init/ueventd.cpp index d2b503b4f..7514b6184 100644 --- a/init/ueventd.cpp +++ b/init/ueventd.cpp @@ -285,7 +285,6 @@ int ueventd_main(int argc, char** argv) { // Keep the current product name base configuration so we remain backwards compatible and // allow it to override everything. - // TODO: cleanup platform ueventd.rc to remove vendor specific device node entries (b/34968103) auto hardware = android::base::GetProperty("ro.hardware", ""); auto ueventd_configuration = ParseConfig({"/system/etc/ueventd.rc", "/vendor/ueventd.rc",