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

Commit 2ad0bd0a authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

logd: Allow (some) headers to be individually importable

LogReader.h needs to be individually importable.

Fix a few others, drop includes of local includes, let them be
included in source instead and allow headers to be included
alphabetically. Was not a complete audit since goal was to
separate LogReader.h out from the pack.

Bug: 27242723
Change-Id: Ic7759ef90995e5bd285810706af33550c73cf5b5
parent 978cda5c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -16,7 +16,10 @@

#include <stdlib.h>

#include <private/android_filesystem_config.h>

#include "FlushCommand.h"
#include "LogBuffer.h"
#include "LogBufferElement.h"
#include "LogCommand.h"
#include "LogReader.h"
+5 −0
Original line number Diff line number Diff line
@@ -20,10 +20,13 @@
#include <limits.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <sys/prctl.h>
#include <sys/uio.h>
#include <syslog.h>

#include <string>

#include <cutils/properties.h>
#include <log/logger.h>
#include <private/android_filesystem_config.h>
@@ -31,7 +34,9 @@

#include "libaudit.h"
#include "LogAudit.h"
#include "LogBuffer.h"
#include "LogKlog.h"
#include "LogReader.h"

#ifndef AUDITD_ENFORCE_INTEGRITY
#define AUDITD_ENFORCE_INTEGRITY false
+4 −1
Original line number Diff line number Diff line
@@ -18,7 +18,10 @@
#define _LOGD_LOG_AUDIT_H__

#include <sysutils/SocketListener.h>
#include "LogReader.h"

#include "LogBuffer.h"

class LogReader;

class LogAudit : public SocketListener {
    LogBuffer *logbuf;
+2 −0
Original line number Diff line number Diff line
@@ -25,9 +25,11 @@
#include <log/logger.h>
#include <private/android_logger.h>

#include "LogBuffer.h"
#include "LogBufferElement.h"
#include "LogCommand.h"
#include "LogReader.h"
#include "LogUtils.h"

const uint64_t LogBufferElement::FLUSH_ERROR(0);
atomic_int_fast64_t LogBufferElement::sequence(1);
+3 −0
Original line number Diff line number Diff line
@@ -20,13 +20,16 @@
#include <limits.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <sys/prctl.h>
#include <sys/uio.h>
#include <syslog.h>

#include <log/logger.h>

#include "LogBuffer.h"
#include "LogKlog.h"
#include "LogReader.h"

#define KMSG_PRIORITY(PRI)           \
    '<',                             \
Loading