From: Petr Holasek <pholasek@redhat.com>
To: Cliff Wickman <cpw@sgi.com>
Cc: linux-numa@vger.kernel.org, Andi Kleen <andi@firstfloor.org>,
	Anton Arapov <anton@redhat.com>, Petr Holasek <pholasek@redhat.com>
Subject: [PATCH v2 7/7] libnuma: no warnings when there are holes in numbering of nodes
Date: Thu, 23 Aug 2012 18:01:59 +0200

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 <pholasek@redhat.com>
---
 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

