From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Holasek 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 Message-ID: <1345737719-11433-8-git-send-email-pholasek@redhat.com> References: <1345737719-11433-1-git-send-email-pholasek@redhat.com> Return-path: In-Reply-To: <1345737719-11433-1-git-send-email-pholasek@redhat.com> Sender: linux-numa-owner@vger.kernel.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Cliff Wickman Cc: linux-numa@vger.kernel.org, Andi Kleen , Anton Arapov , Petr Holasek 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 --- 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