small procps patch to get meminfo stuff correct

Patrick St. Jean (psj@cgmlarson.com)
Sun, 23 Nov 1997 18:29:13 -0600 (CST)


Hi all!
I've fixed a small problem with the procps stuff that uses /proc/meminfo
It was running out of space to read all the stuff reported by free (I've
got 128M swap). The buffer just wasn't long enough when you've either got
lots of swap or lots of ram (or both). I'm going to send this to procps's
maintainer as well.

--- cut here ---
--- procps-1.01/proc/sysinfo.c.orig Sun Nov 23 17:13:00 1997
+++ procps-1.01/proc/sysinfo.c Sun Nov 23 17:07:20 1997
@@ -19,7 +19,7 @@
#define LOADAVG_FILE "/proc/loadavg"
#define MEMINFO_FILE "/proc/meminfo"

-static char buf[300];
+static char buf[512];

/* This macro opens FILE only if necessary and seeks to 0 so that successive
calls to the functions are more efficient. It also reads the current
--- cut here ---

-- 
+----------------------------------------------------------------------------+
| Patrick St. Jean              '97 XLH 883                psj@cgmlarson.com |
| Programmer & Systems Administrator                    +1 713-977-4177 x115 |
| Larson Software Technology                        http://www.cgmlarson.com |
+----------------------------------------------------------------------------+