Resolves: bz666379

This commit is contained in:
Neil Horman 2011-01-04 16:13:38 -05:00
parent 031e79c42e
commit 0b3bb49fa2
4 changed files with 23 additions and 10 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ numactl-2.0.2.tar.gz
numactl-2.0.3-rc3.tar.gz
numactl-2.0.3.tar.gz
/numactl-2.0.5.tar.gz
/numactl-2.0.6.tar.gz

View File

@ -1,7 +1,7 @@
diff -up numactl-2.0.3-rc3/libnuma.c.orig numactl-2.0.3-rc3/libnuma.c
--- numactl-2.0.3-rc3/libnuma.c.orig 2009-06-17 13:13:28.000000000 -0400
+++ numactl-2.0.3-rc3/libnuma.c 2009-06-17 13:14:10.000000000 -0400
@@ -1209,9 +1209,10 @@ numa_node_to_cpus_v1(int node, unsigned
diff -up numactl-2.0.6/libnuma.c.orig numactl-2.0.6/libnuma.c
--- numactl-2.0.6/libnuma.c.orig 2010-12-29 08:23:11.000000000 -0500
+++ numactl-2.0.6/libnuma.c 2011-01-04 16:10:58.514024338 -0500
@@ -1263,9 +1263,10 @@ numa_node_to_cpus_v1(int node, unsigned
sprintf(fn, "/sys/devices/system/node/node%d/cpumap", node);
f = fopen(fn, "r");
if (!f || getdelim(&line, &len, '\n', f) < 1) {
@ -15,17 +15,26 @@ diff -up numactl-2.0.3-rc3/libnuma.c.orig numactl-2.0.3-rc3/libnuma.c
bitmask.maskp = (unsigned long *)mask;
bitmask.size = buflen_needed * 8;
numa_bitmask_setall(&bitmask);
@@ -1287,9 +1288,10 @@ numa_node_to_cpus_v2(int node, struct bi
@@ -1341,13 +1342,15 @@ numa_node_to_cpus_v2(int node, struct bi
sprintf(fn, "/sys/devices/system/node/node%d/cpumap", node);
f = fopen(fn, "r");
if (!f || getdelim(&line, &len, '\n', f) < 1) {
- numa_warn(W_nosysfs2,
- "/sys not mounted or invalid. Assuming one node: %s",
- strerror(errno));
+ if (f)
- numa_warn(W_nosysfs2,
- "(cannot open or correctly parse %s)", fn);
- numa_bitmask_setall(mask);
- err = -1;
+ if (f) {
+ numa_warn(W_nosysfs2,
+ "/sys not mounted or invalid. Assuming one node: %s",
+ strerror(errno));
numa_bitmask_setall(mask);
err = -1;
+ numa_warn(W_nosysfs2,
+ "(cannot open or correctly parse %s)", fn);
+ numa_bitmask_setall(mask);
+ err = -1;
+ }
}
if (f)
fclose(f);

View File

@ -1,6 +1,6 @@
Name: numactl
Summary: Library for tuning for Non Uniform Memory Access machines
Version: 2.0.5
Version: 2.0.6
Release: 1%{dist}
License: LGPLv2/GPLv2
Group: System Environment/Base
@ -69,6 +69,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/*.3*
%changelog
* Tue Jan 04 2011 Neil Horman <nhorman@redhat.com> - 2.0.6-1
- Update to latest upstream stable version (bz 666379)
* Mon Oct 18 2010 Neil Horman <nhorman@redhat.com> - 2.0.5-1
- Update to latest stable upstream source

View File

@ -1 +1 @@
7cafe683095d4677326bcc5e4b3cc541 numactl-2.0.5.tar.gz
e84a6351312ec786a4b7978fea76f92b numactl-2.0.6.tar.gz