|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] xen/arm: use strcmp in device_tree_type_matches
# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
# Date 1355399041 0
# Node ID 69ec301b8ec20eacd3ebe87f56baca8b0e22c83f
# Parent 54340e92367f314475ba68dc9a477c3c33d9236c
xen/arm: use strcmp in device_tree_type_matches
We want to match the exact string rather than the first subset.
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
diff -r 54340e92367f -r 69ec301b8ec2 xen/common/device_tree.c
--- a/xen/common/device_tree.c Thu Dec 13 11:44:00 2012 +0000
+++ b/xen/common/device_tree.c Thu Dec 13 11:44:01 2012 +0000
@@ -44,14 +44,13 @@ bool_t device_tree_node_matches(const vo
bool_t device_tree_type_matches(const void *fdt, int node, const char *match)
{
- int len;
const void *prop;
- prop = fdt_getprop(fdt, node, "device_type", &len);
+ prop = fdt_getprop(fdt, node, "device_type", NULL);
if ( prop == NULL )
return 0;
- return !strncmp(prop, match, len);
+ return !strcmp(prop, match);
}
bool_t device_tree_node_compatible(const void *fdt, int node, const char
*match)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |