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

Commit b19bbaeb authored by Tom Cherry's avatar Tom Cherry Committed by Automerger Merge Worker
Browse files

Merge "Query log size properties only within logd" am: ca0a46ae

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1390949

Change-Id: Ib26c90b96f0ae2c13563b84b6724a35f8d734f24
parents fef53055 ca0a46ae
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
liblog_sources = [
    "log_event_list.cpp",
    "log_event_write.cpp",
    "log_size.cpp",
    "logger_name.cpp",
    "logger_read.cpp",
    "logger_write.cpp",
+0 −7
Original line number Diff line number Diff line
@@ -144,13 +144,6 @@ int __android_log_security_bwrite(int32_t tag, const void* payload, size_t len);
int __android_log_security_bswrite(int32_t tag, const char* payload);
int __android_log_security(); /* Device Owner is present */

#define LOG_BUFFER_SIZE (256 * 1024) /* Tuned with ro.logd.size per-platform \
                                      */
#define LOG_BUFFER_MIN_SIZE (64 * 1024UL)
#define LOG_BUFFER_MAX_SIZE (256 * 1024 * 1024UL)
unsigned long __android_logger_get_buffer_size(log_id_t logId);
bool __android_logger_valid_buffer_size(unsigned long value);

/* Retrieve the composed event buffer */
int android_log_write_list_buffer(android_log_context ctx, const char** msg);

+0 −1
Original line number Diff line number Diff line
@@ -84,7 +84,6 @@ LIBLOG_PRIVATE {
  global:
    __android_log_pmsg_file_read;
    __android_log_pmsg_file_write;
    __android_logger_get_buffer_size;
    android_openEventTagMap;
    android_log_processBinaryLogBuffer;
    android_log_processLogBuffer;
+1 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ cc_library_static {
        "LogReaderList.cpp",
        "LogReaderThread.cpp",
        "LogBufferElement.cpp",
        "LogSize.cpp",
        "LogStatistics.cpp",
        "LogTags.cpp",
        "PruneList.cpp",
+8 −8
Original line number Diff line number Diff line
@@ -101,9 +101,9 @@ int CommandListener::GetBufSizeCmd::runCommand(SocketClient* cli, int argc,
        return 0;
    }

    unsigned long size = buf()->GetSize((log_id_t)id);
    size_t size = buf()->GetSize(static_cast<log_id_t>(id));
    char buf[512];
    snprintf(buf, sizeof(buf), "%lu", size);
    snprintf(buf, sizeof(buf), "%zu", size);
    cli->sendMsg(buf);
    return 0;
}
@@ -127,8 +127,8 @@ int CommandListener::SetBufSizeCmd::runCommand(SocketClient* cli, int argc,
        return 0;
    }

    unsigned long size = atol(argv[2]);
    if (buf()->SetSize((log_id_t)id, size)) {
    size_t size = atol(argv[2]);
    if (!buf()->SetSize(static_cast<log_id_t>(id), size)) {
        cli->sendMsg("Range Error");
        return 0;
    }
@@ -150,9 +150,9 @@ int CommandListener::GetBufSizeReadableCmd::runCommand(SocketClient* cli, int ar
        return 0;
    }

    unsigned long size = stats()->SizeReadable((log_id_t)id);
    size_t size = stats()->SizeReadable(static_cast<log_id_t>(id));
    char buf[512];
    snprintf(buf, sizeof(buf), "%lu", size);
    snprintf(buf, sizeof(buf), "%zu", size);
    cli->sendMsg(buf);
    return 0;
}
@@ -171,9 +171,9 @@ int CommandListener::GetBufSizeUsedCmd::runCommand(SocketClient* cli, int argc,
        return 0;
    }

    unsigned long size = stats()->Sizes((log_id_t)id);
    size_t size = stats()->Sizes(static_cast<log_id_t>(id));
    char buf[512];
    snprintf(buf, sizeof(buf), "%lu", size);
    snprintf(buf, sizeof(buf), "%zu", size);
    cli->sendMsg(buf);
    return 0;
}
Loading