summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Walle <bwalle@suse.de>2007-03-14 15:48:15 +0100
committerSimon Horman <horms@verge.net.au>2007-03-16 13:28:36 +0900
commitd10e7735d93166fbfcc3263b1f77e7fc5de0a541 (patch)
tree29494965d381b9c29011b3a1681cb79f69df5512
parentcd6091ebd1c0ebc608390996c1cb088fab13ec79 (diff)
Fix wrong max_memory_ranges value
The value of max_memory_ranges is calculated in count_memory_ranges() and only counts the memory@ nodes. However, in get_devtree_details(), pci@ nodes are also added to exclude_range just at the end of the loop. This patch changes count_memory_ranges() to also consider pci@ nodes in /proc/device-tree. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/arch/ppc64/kexec-ppc64.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c
index 5802522..d17761d 100644
--- a/kexec/arch/ppc64/kexec-ppc64.c
+++ b/kexec/arch/ppc64/kexec-ppc64.c
@@ -117,7 +117,8 @@ static int count_memory_ranges()
}
while ((dentry = readdir(dir)) != NULL) {
- if (strncmp(dentry->d_name, "memory@", 7))
+ if (strncmp(dentry->d_name, "memory@", 7) &&
+ strncmp(dentry->d_name, "pci@", 4))
continue;
max_memory_ranges++;
}