Fixed for people running 2.6 without /sys.

* netload.c: (glibtop_get_netload_s):

	Fixed for people running 2.6 without /sys.
This commit is contained in:
Benoît Dejean
2005-08-03 13:26:06 +00:00
parent 9f7d505d20
commit a0493a0ff1
2 changed files with 10 additions and 2 deletions

View File

@@ -1,3 +1,9 @@
2005-08-03 Benoît Dejean <TazForEver@dlfp.org>
* netload.c: (glibtop_get_netload_s):
Fixed for people running 2.6 without /sys.
2005-08-02 Benoît Dejean <TazForEver@dlfp.org>
* glibtop_server.h:

View File

@@ -540,10 +540,12 @@ glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
if (server->os_version_code < LINUX_VERSION_CODE(2, 1, 14)) {
linux_2_0_stats(server, buf, interface);
}
else if (server->os_version_code > LINUX_VERSION_CODE(2, 6, 0)) {
else if (server->os_version_code > LINUX_VERSION_CODE(2, 6, 0)
&& g_file_test("/sys", G_FILE_TEST_IS_DIR)) {
linux_2_6_stats(server, buf, interface);
}
else if (server->os_version_code > LINUX_VERSION_CODE(2, 4, 0)) {
else {
/* 2.4 and 2.6 without /sys (?$£Z¥!) */
linux_2_4_stats(server, buf, interface);
}