[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 3/7] xen/arm: keep track of reserved-memory regions





On 06/08/2019 22:49, Stefano Stabellini wrote:
  static void __init process_multiboot_node(const void *fdt, int node,
                                            const char *name,
                                            u32 address_cells, u32 size_cells)
@@ -307,7 +334,11 @@ static int __init early_scan_node(const void *fdt,
if ( device_tree_node_matches(fdt, node, "memory") )
          rc = process_memory_node(fdt, node, name, depth,
-                                 address_cells, size_cells, NULL);
+                                 address_cells, size_cells, &bootinfo.mem);
+    else if ( depth == 1 && !strcmp(name, "reserved-memory") &&
+              strlen(name) == strlen("reserved-memory") )

Unless my stdlib knowledge is rusty, strcmp() will only return 0 if the two string exactly matches. This implies the two strings are exactly the same length.

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.