svn path=/trunk/boinc/; revision=1140
This commit is contained in:
Eric Heien 2003-04-08 07:05:22 +00:00
parent 745ec3ac5e
commit 67cc3e4a07
1 changed files with 6 additions and 7 deletions

View File

@ -164,7 +164,6 @@ void parse_cpuinfo(HOST_INFO& host) {
FILE* f = fopen("/proc/cpuinfo", "r");
if (!f) return;
host.p_ncpus = 1;
while (fgets(buf, 256, f)) {
if (strstr(buf, "vendor_id\t: ") == buf) {
sscanf(buf, "vendor_id\t: %s", host.p_vendor);
@ -208,7 +207,12 @@ void get_host_disk_info( double &total_space, double &free_space ) {
//
int get_host_info(HOST_INFO& host) {
get_host_disk_info( host.d_total, host.d_free );
#ifdef linux
parse_cpuinfo(host);
parse_meminfo(host);
#endif
#if HAVE_SYS_SYSTEMINFO_H
char buf[256];
@ -296,11 +300,6 @@ int get_host_info(HOST_INFO& host) {
host.m_swap = vm_info.t_vm;*/
#endif
#ifdef linux
parse_cpuinfo(host);
parse_meminfo(host);
#endif
get_local_domain_name(host.domain_name, sizeof(host.domain_name));
get_local_ip_addr_str(host.ip_addr, sizeof(host.ip_addr));
host.timezone = get_timezone();