(GET_NPROCS_PARSER): added code to parse new 2.4 format.

(GET_NPROCS_CONF_PARSER): likewise.
This commit is contained in:
Ulrich Drepper 2001-04-06 22:37:39 +00:00
parent 5e9cba3061
commit 4adec71eab
1 changed files with 5 additions and 2 deletions

View File

@ -29,7 +29,9 @@
If there is no "CPUs ..." line then we are on a UP system. */ \
(RESULT) = 1; \
while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \
if (sscanf (BUFFER, "CPUs probed %*d active %d", &(RESULT)) == 1) \
if ((sscanf (BUFFER, "cpus active : %d", &(RESULT)) == 1) \
|| (sscanf (BUFFER, "CPUs probed %*d active %d", \
&(RESULT)) == 1)) \
break; \
} \
while (0)
@ -46,7 +48,8 @@
If there is no "CPUs ..." line then we are on a UP system. */ \
(RESULT) = 1; \
while (fgets_unlocked ((BUFFER), sizeof (BUFFER), (FP)) != NULL) \
if (sscanf (buffer, "CPUs probed %d", &(RESULT)) == 1) \
if ((sscanf (buffer, "cpus detected : %d", &(RESULT)) == 1) \
|| (sscanf (buffer, "CPUs probed %d", &(RESULT)) == 1)) \
break; \
} \
while (0)