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

Commit 54ae37c9 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: get wsa881x temperature zone names using key value pair" into...

Merge "hal: get wsa881x temperature zone names using key value pair" into av-userspace.lnx.1.0-dev.1.0
parents fdaedc9f 6cc88425
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -187,6 +187,9 @@ int get_tzn(const char *sensor_name)
    char name[MAX_PATH] = {0};
    char cwd[MAX_PATH] = {0};

    if (!sensor_name)
        return found;

    if (!getcwd(cwd, sizeof(cwd)))
        return found;

@@ -210,11 +213,12 @@ int get_tzn(const char *sensor_name)
            if (strcmp(tzdirent->d_name, "type"))
                continue;
            snprintf(name, MAX_PATH, TZ_TYPE, tzn);
            ALOGD("Opening %s\n", name);
            ALOGV("Opening %s\n", name);
            read_line_from_file(name, buf, sizeof(buf));
            if (strlen(buf) > 0)
                buf[strlen(buf) - 1] = '\0';
            if (!strcmp(buf, sensor_name)) {
                ALOGD(" spkr tz name found, %s\n", name);
                found = 1;
                break;
            }