summaryrefslogtreecommitdiffstats
path: root/logd/LogAudit.h
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-10-13 09:59:37 -0700
committerMark Salyzyn <salyzyn@google.com>2014-12-05 20:56:44 +0000
commiteb06de716b4f33e9fdb1c41f0cce61084545bfd5 (patch)
treea27f67c9f70ef4c694216f5f7b503e738dc7d456 /logd/LogAudit.h
parente0a5ab5d56a3488377262e8fd14d3a90b7d74696 (diff)
downloadsystem_core-eb06de716b4f33e9fdb1c41f0cce61084545bfd5.zip
system_core-eb06de716b4f33e9fdb1c41f0cce61084545bfd5.tar.gz
system_core-eb06de716b4f33e9fdb1c41f0cce61084545bfd5.tar.bz2
logd: auditd remove logDmesg method
- logDmesg method consumes considerable memory resources (typically 128KB depending on kernel) - In the future (eg: klogd, syslogd) there may be need to feed multiple logs or threads with the retrieved data. - By moving the actions of logDmesg into the mainline that instantiates the thread objects, we can leverage a single allocation of the the kernel log allocation. - logDmesg (private) is replaced with log (public) which has a more useful and descriptive purpose for the class. Change-Id: Ie2dd0370661493c1e596a7e486904a0e8caab9ff
Diffstat (limited to 'logd/LogAudit.h')
-rw-r--r--logd/LogAudit.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/logd/LogAudit.h b/logd/LogAudit.h
index 111030a..f977be9 100644
--- a/logd/LogAudit.h
+++ b/logd/LogAudit.h
@@ -24,16 +24,17 @@ class LogAudit : public SocketListener {
LogBuffer *logbuf;
LogReader *reader;
int fdDmesg;
+ bool initialized;
public:
LogAudit(LogBuffer *buf, LogReader *reader, int fdDmesg);
+ int log(char *buf);
protected:
virtual bool onDataAvailable(SocketClient *cli);
private:
static int getLogSocket();
- void logDmesg();
int logPrint(const char *fmt, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
};