Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85f2bc93 authored by Tom Cherry's avatar Tom Cherry
Browse files

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
parent 7ef143fc
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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<std::chrono::steady_clock>;

static void UpdateTimeSpec(timespec& ts, std::chrono::milliseconds relative_timeout,
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ namespace {

void RunTest(const std::string& data, const std::vector<std::vector<std::string>>& 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;
+0 −1
Original line number Diff line number Diff line
@@ -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",