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:
@@ -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>
|
2005-08-02 Benoît Dejean <TazForEver@dlfp.org>
|
||||||
|
|
||||||
* glibtop_server.h:
|
* glibtop_server.h:
|
||||||
|
@@ -540,10 +540,12 @@ glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
|
|||||||
if (server->os_version_code < LINUX_VERSION_CODE(2, 1, 14)) {
|
if (server->os_version_code < LINUX_VERSION_CODE(2, 1, 14)) {
|
||||||
linux_2_0_stats(server, buf, interface);
|
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);
|
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);
|
linux_2_4_stats(server, buf, interface);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user