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

Commit cdda62b2 authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

logd: ro.config.low_ram set buffer size to 64K

Bug: 25792367
Change-Id: Icae85a7de70b3a71f89b2bf8c80866649f727177
parent 461a2954
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -100,6 +100,11 @@ void LogBuffer::init() {
    unsigned long default_size = property_get_size(global_tuneable);
    if (!default_size) {
        default_size = property_get_size(global_default);
        if (!default_size) {
            default_size = property_get_bool("ro.config.low_ram", false) ?
                LOG_BUFFER_MIN_SIZE : // 64K
                LOG_BUFFER_SIZE;      // 256K
        }
    }

    log_id_for_each(i) {
+3 −0
Original line number Diff line number Diff line
@@ -43,6 +43,9 @@ const char *tagToName(uint32_t tag);
bool clientHasLogCredentials(uid_t uid, gid_t gid, pid_t pid);
bool clientHasLogCredentials(SocketClient *cli);

// Furnished in main.cpp
bool property_get_bool(const char *key, bool def);

static inline bool worstUidEnabledForLogid(log_id_t id) {
    return (id == LOG_ID_MAIN) || (id == LOG_ID_SYSTEM) || (id == LOG_ID_RADIO);
}
+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ static int drop_privs() {
}

// Property helper
static bool property_get_bool(const char *key, bool def) {
bool property_get_bool(const char *key, bool def) {
    char property[PROPERTY_VALUE_MAX];
    property_get(key, property, "");