Projects
Eulaceura:Factory
procinfo
_service:obs_scm:procinfo-18-mharris-use-syscon...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:procinfo-18-mharris-use-sysconf.patch of Package procinfo
--- procinfo-18/procinfo.c.mharris-use-sysconf 2004-01-16 15:40:37.000000000 -0500 +++ procinfo-18/procinfo.c 2004-01-17 02:01:16.000000000 -0500 @@ -837,19 +837,7 @@ } /* Count number of CPUs */ - cpuinfofp = myfopen (PROC_DIR "cpuinfo"); - if (cpuinfofp) { - while (fgets (line, sizeof (line), cpuinfofp)) - if (!strncmp ("processor", line, 9)) /* intel */ - nr_cpus++; - else if (!strncmp ("ncpus ", line, 6)) /* sparc */ - nr_cpus = atoi(line+19); - else if (!strncmp ("cpus detected", line, 13)) /* alpha */ - nr_cpus = atoi(line+27); - fclose (cpuinfofp); - } - if (nr_cpus == 0) - nr_cpus = 1; + nr_cpus = sysconf (_SC_NPROCESSORS_ONLN); /* Gets called from winsz(), but in case stdout is redirected: */ version = make_version (versionfp);
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2