Make default shmlog_size a #define, SHMLOG_SIZE
Patch status: needinfo
Patch by Alexander Berntsen
To apply this patch, use:
curl http://cr.i3wm.org/patch/172/raw.patch | git am
b/include/shmlog.h
| 14 |
@@ -14,6 +14,8 @@ |
| 15 |
#include <stdint.h> |
| 16 |
#include <pthread.h> |
| 17 |
|
| 18 |
+#define SHMLOG_SIZE 25 * 1024 * 1024 |
| 19 |
+ |
| 20 |
/* |
| 21 |
* Header of the shmlog file. Used by i3/src/log.c and i3/i3-dump-log/main.c. |
| 22 |
* |
b/src/main.c
| 27 |
@@ -19,6 +19,8 @@ |
| 28 |
#include <sys/mman.h> |
| 29 |
#include <sys/stat.h> |
| 30 |
#include "all.h" |
| 31 |
+/* SHMLOG_SIZE */ |
| 32 |
+#include "shmlog.h" |
| 33 |
|
| 34 |
#include "sd-daemon.h" |
| 35 |
|
| 36 |
@@ -291,7 +293,7 @@ int main(int argc, char *argv[]) {
|
| 37 |
init_logging(); |
| 38 |
|
| 39 |
/* On non-release builds, disable SHM logging by default. */ |
| 40 |
- shmlog_size = (is_debug_build() ? 25 * 1024 * 1024 : 0); |
| 41 |
+ shmlog_size = (is_debug_build() ? SHMLOG_SIZE : 0); |
| 42 |
|
| 43 |
start_argv = argv; |
| 44 |
|