mirror of
git://sourceware.org/git/glibc.git
synced 2025-01-18 12:16:13 +08:00
* sysdeps/unix/sysv/linux/m68k/getsysstats.c (GET_NPROCS_PARSER):
Change parameters and use next_line.
This commit is contained in:
parent
4c8c18106e
commit
edb1d6ef2f
@ -1,3 +1,8 @@
|
|||||||
|
2009-03-17 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/m68k/getsysstats.c (GET_NPROCS_PARSER):
|
||||||
|
Change parameters and use next_line.
|
||||||
|
|
||||||
2009-03-15 Joseph Myers <joseph@codesourcery.com>
|
2009-03-15 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
* sysdeps/m68k/bits/link.h: Uglify function parameter names.
|
* sysdeps/m68k/bits/link.h: Uglify function parameter names.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Determine various system internal values, Linux/m68k version.
|
/* Determine various system internal values, Linux/m68k version.
|
||||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
Copyright (C) 2003, 2009 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Andreas Schwab <schwab@suse.de>
|
Contributed by Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/* We need to define a special parser for /proc/cpuinfo. */
|
/* We need to define a special parser for /proc/cpuinfo. */
|
||||||
#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \
|
#define GET_NPROCS_PARSER(FD, BUFFER, CP, RE, BUFFER_END, RESULT) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
(RESULT) = 0; \
|
(RESULT) = 0; \
|
||||||
@ -28,8 +28,9 @@
|
|||||||
"CPU:". We don't have to fear extremely long lines since \
|
"CPU:". We don't have to fear extremely long lines since \
|
||||||
the kernel will not generate them. 8192 bytes are really \
|
the kernel will not generate them. 8192 bytes are really \
|
||||||
enough. */ \
|
enough. */ \
|
||||||
while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \
|
char *l; \
|
||||||
if (strncmp (BUFFER, "CPU:", 4) == 0) \
|
while ((l = next_line (FD, BUFFER, &CP, &RE, BUFFER_END)) != NULL) \
|
||||||
|
if (strncmp (l, "CPU:", 4) == 0) \
|
||||||
++(RESULT); \
|
++(RESULT); \
|
||||||
} \
|
} \
|
||||||
while (0)
|
while (0)
|
||||||
|
Loading…
Reference in New Issue
Block a user