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

Commit 683790ae authored by Elliott Hughes's avatar Elliott Hughes Committed by Gerrit Code Review
Browse files

Merge "init: Fix bootchart trigger for emulator"

parents a1c344b9 9136f38a
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -164,10 +164,11 @@ static int bootchart_init() {
        // timeout. this is useful when using -wipe-data since the /data
        // partition is fresh.
        std::string cmdline;
        const char* s;
        android::base::ReadFileToString("/proc/cmdline", &cmdline);
#define KERNEL_OPTION  "androidboot.bootchart="
        if (strstr(cmdline.c_str(), KERNEL_OPTION) != NULL) {
            timeout = atoi(cmdline.c_str() + sizeof(KERNEL_OPTION) - 1);
        if ((s = strstr(cmdline.c_str(), KERNEL_OPTION)) != NULL) {
            timeout = atoi(s + sizeof(KERNEL_OPTION) - 1);
        }
    }
    if (timeout == 0)