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 <[EMAIL PROTECTED]>

---
 kexec/arch/ppc64/kexec-ppc64.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: kexec-tools-1.101/kexec/arch/ppc64/kexec-ppc64.c
===================================================================
--- kexec-tools-1.101.orig/kexec/arch/ppc64/kexec-ppc64.c
+++ kexec-tools-1.101/kexec/arch/ppc64/kexec-ppc64.c
@@ -118,7 +118,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++;
        }
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot

Reply via email to