#! /bin/sh /usr/share/dpatch/dpatch-run
## 40_bts-441378_fix_buffer_length.dpatch by Sandro Tosi <matrixhasu@gmail.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: BTS 441378, increase the buffer length
@DPATCH@
diff -urNad xsysinfo~/sysinfo.c xsysinfo/sysinfo.c
--- xsysinfo~/sysinfo.c 2008-01-21 22:18:24.503408508 +0100
+++ xsysinfo/sysinfo.c 2008-01-21 22:20:36.030903835 +0100
@@ -34,7 +34,9 @@
static int loadavg_fd;
static int swaps_fd;
-static char buffer[1024];
+// Sandro Tosi, 2008-01-21
+// Size 16k, it must be bigger then any of /proc/{meminfo,loadavg,stat}
+static char buffer[16384];
/* reread rewritten by Ernst Kloppenburg <kloppen@isr.uni-stuttgart.de> */
/* Now works with Linux 2.2 */