[PATCH v2 7/7] libnuma: no warnings when there are holes in numbering of nodes

Petr Holasek <[email protected]> Thu, 23 Aug 2012 18:01:59 +0200
Newsgroups org.kernel.vger.linux-numa
Message-ID <[email protected]>
Some machines don't even export their 0th node to acpi tables when there
is no memory installed. This patch removes warning in such cases.

Signed-off-by: Petr Holasek <[email protected]>
---
 distance.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/distance.c b/distance.c
index 2b48f97..4a26972 100755
--- a/distance.c
+++ b/distance.c
@@ -64,7 +64,7 @@ static int read_distance_table(void)
 		sprintf(fn, "/sys/devices/system/node/node%d/distance", nd);
 		dfh = fopen(fn, "r");
 		if (!dfh) {
-			if (errno == ENOENT && nd > 0)
+			if (errno == ENOENT)
 				err = 0;
 			if (!err && nd<maxnode)
 				continue;
-- 
1.7.11.4