New has_sysfs function to avoid stating over and over '/sys' on each
2006-07-27 Benoît Dejean <benoit@placenet.org> * glibtop_private.c: (has_sysfs): * glibtop_private.h: * netload.c: (glibtop_get_netload_s): * open.c: (set_linux_version): New has_sysfs function to avoid stating over and over '/sys' on each netload call.
This commit is contained in:
committed by
Benoît Dejean
parent
3345ef1704
commit
d497c25081
@@ -541,7 +541,7 @@ glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
|
||||
linux_2_0_stats(server, buf, interface);
|
||||
}
|
||||
else if (server->os_version_code > LINUX_VERSION_CODE(2, 6, 0)
|
||||
&& g_file_test("/sys", G_FILE_TEST_IS_DIR)) {
|
||||
&& has_sysfs()) {
|
||||
linux_2_6_stats(server, buf, interface);
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user