PWD := $(shell pwd)
LD = ${CROSS_COMPILE}ld
+LOGGER_BUFFER_SIZE ?= 256
# See commit 0b999ae3614d0 ("Merge tag 'compiler-attributes-for-linus-v5.0-rc7'"[..]) for rationale
-CFLAGS_logger.o += -Wno-error=missing-attributes
+CFLAGS_logger.o += -Wno-error=missing-attributes -DLOGGER_BUFFER_SIZE=$(LOGGER_BUFFER_SIZE)
CFLAGS_proc-tsm.o += -Wno-error=missing-attributes
# Build is disabled by default so that when new module is added to this repository (and -source package),
#include <uapi/linux/logger.h>
+#ifndef LOGGER_BUFFER_SIZE
+#define LOGGER_BUFFER_SIZE 256
+#endif
+
/**
* struct logger_log - represents a specific log, such as 'main' or 'radio'
* @buffer: The actual ring buffer
{
int ret;
- ret = create_log(LOGGER_LOG_MAIN, 256*1024);
+ ret = create_log(LOGGER_LOG_MAIN, LOGGER_BUFFER_SIZE*1024);
if (unlikely(ret))
goto out;
- ret = create_log(LOGGER_LOG_EVENTS, 256*1024);
+ ret = create_log(LOGGER_LOG_EVENTS, LOGGER_BUFFER_SIZE*1024);
if (unlikely(ret))
goto out;
- ret = create_log(LOGGER_LOG_RADIO, 256*1024);
+ ret = create_log(LOGGER_LOG_RADIO, LOGGER_BUFFER_SIZE*1024);
if (unlikely(ret))
goto out;
- ret = create_log(LOGGER_LOG_SYSTEM, 256*1024);
+ ret = create_log(LOGGER_LOG_SYSTEM, LOGGER_BUFFER_SIZE*1024);
if (unlikely(ret))
goto out;