diff options
author | Benoît Dejean <bdejean@src.gnome.org> | 2007-08-26 16:05:36 +0000 |
---|---|---|
committer | Benoît Dejean <bdejean@src.gnome.org> | 2007-08-26 16:05:36 +0000 |
commit | 871f300a2c5832ca8df66e956fccf2bdfb9a95c6 (patch) | |
tree | 3dc53bc057a2e89a80daca59cee1ddc0ade65ea9 /sysdeps/linux/sysinfo.c | |
parent | 650c8f2582f1b1ce29beff178bc8b9086259accf (diff) | |
download | libgtop-871f300a2c5832ca8df66e956fccf2bdfb9a95c6.tar.gz |
Added a bufsiz argument to file_to_buffer().
Increased read buffer size in get_sysinfo().
svn path=/trunk/; revision=2637
Diffstat (limited to 'sysdeps/linux/sysinfo.c')
-rw-r--r-- | sysdeps/linux/sysinfo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/linux/sysinfo.c b/sysdeps/linux/sysinfo.c index 3e4f9695..9b3747de 100644 --- a/sysdeps/linux/sysinfo.c +++ b/sysdeps/linux/sysinfo.c @@ -26,7 +26,7 @@ #include "glibtop_private.h" -#define FILENAME "/proc/cpuinfo" +#define FILENAME "/home/benoit/Desktop/libgtop/cpuinfo8.txt" static const unsigned long _glibtop_sysdeps_sysinfo = (1L << GLIBTOP_SYSINFO_CPUINFO); @@ -36,12 +36,12 @@ static glibtop_sysinfo sysinfo = { .flags = 0 }; static void init_sysinfo (glibtop *server) { - char buffer [BUFSIZ]; + char buffer [16384]; gchar ** processors; if(G_LIKELY(sysinfo.flags)) return; - file_to_buffer(server, buffer, FILENAME); + file_to_buffer(server, buffer, sizeof buffer, FILENAME); /* cpuinfo records are seperated by a blank line */ processors = g_strsplit(buffer, "\n\n", 0); |