rpms/cpufrequtils/F-12 aperf-fix-proc-read-routine.patch,NONE,1.1
Anton Arapov
aarapov at fedoraproject.org
Wed Nov 11 10:15:25 UTC 2009
- Previous message (by thread): rpms/cpufrequtils/F-12 .cvsignore, 1.4, 1.5 cpufrequtils.spec, 1.8, 1.9 sources, 1.4, 1.5 cpufrequtils-fix-parallel-build-of-ccdv.patch, 1.1, NONE
- Next message (by thread): rpms/perl-Net-CIDR/devel Makefile, NONE, 1.1 import.log, NONE, 1.1 perl-Net-CIDR.spec, NONE, 1.1 sources, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: aarapov
Update of /cvs/pkgs/rpms/cpufrequtils/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16382
Added Files:
aperf-fix-proc-read-routine.patch
Log Message:
fix for the aperf, went upstream today.
aperf-fix-proc-read-routine.patch:
aperf.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
--- NEW FILE aperf-fix-proc-read-routine.patch ---
--- cpufrequtils-006/utils/aperf.c.orig 2009-11-11 10:11:46.068391593 +0100
+++ cpufrequtils-006/utils/aperf.c 2009-11-11 10:53:07.812489952 +0100
@@ -76,14 +76,15 @@ static unsigned int count_cpus(void)
unsigned int cpunr = 0;
fp = fopen("/proc/stat", "r");
- if(!fp)
- goto err_out;
+ if(!fp) {
+ printf("Couldn't count the number of CPUs (%s: %s), "
+ "assuming 1\n", "/proc/stat", strerror(errno));
+ return 1;
+ }
while (!feof(fp)) {
- if (!fgets(value, LINE_LEN, fp)) {
- fclose(fp);
- goto err_out;
- }
+ if (!fgets(value, LINE_LEN, fp))
+ continue;
value[LINE_LEN - 1] = '\0';
if (strlen(value) < (LINE_LEN - 2))
continue;
@@ -98,11 +99,6 @@ static unsigned int count_cpus(void)
/* cpu count starts from 0, on error return 1 (UP) */
return (ret+1);
-
-err_out:
- printf("Couldn't count the number of CPUs (%s: %s), "
- "assuming 1\n", "/proc/stat", strerror(errno));
- return 1;
}
static int has_mperf_aperf_support(int cpu)
- Previous message (by thread): rpms/cpufrequtils/F-12 .cvsignore, 1.4, 1.5 cpufrequtils.spec, 1.8, 1.9 sources, 1.4, 1.5 cpufrequtils-fix-parallel-build-of-ccdv.patch, 1.1, NONE
- Next message (by thread): rpms/perl-Net-CIDR/devel Makefile, NONE, 1.1 import.log, NONE, 1.1 perl-Net-CIDR.spec, NONE, 1.1 sources, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list