diff options
author | Bernhard Walle <bwalle@suse.de> | 2007-03-14 15:48:15 +0100 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2007-03-16 13:28:36 +0900 |
commit | d10e7735d93166fbfcc3263b1f77e7fc5de0a541 (patch) | |
tree | 29494965d381b9c29011b3a1681cb79f69df5512 | |
parent | cd6091ebd1c0ebc608390996c1cb088fab13ec79 (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.c | 3 |
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++; } |