From: Stefano Stabellini Subject: [PATCH 2/2] xen/arm: use strcmp in device_tree_type_matches Date: Wed, 5 Dec 2012 19:01:45 +0000 Message-ID: <1354734105-7007-2-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com Cc: tim@xen.org, Ian.Campbell@citrix.com, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org We want to match the exact string rather than the first subset. Signed-off-by: Stefano Stabellini --- xen/common/device_tree.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index b321d99..3d4a7a9 100644 --- a/xen/common/device_tree.c +++ b/xen/common/device_tree.c @@ -51,7 +51,7 @@ bool_t device_tree_type_matches(const void *fdt, int node, const char *match) 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) -- 1.7.2.5