block: fix find_block_info() by label
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 6 Nov 2013 12:48:01 +0000 (12:48 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 7 Nov 2013 17:03:02 +0000 (17:03 +0000)
block.c

diff --git a/block.c b/block.c
index 941e4b825944aec08ff2667b9937cf1c48b5a7f4..aa37e24c55698a01dd7751f3c99740c6731ecb5e 100644 (file)
--- a/block.c
+++ b/block.c
@@ -520,7 +520,7 @@ static struct blkid_struct_probe* find_block_info(char *uuid, char *label, char
 
        if (label)
                list_for_each_entry(pr, &devices, list)
-                       if (strcmp(pr->label, label))
+                       if (!strcmp(pr->label, label))
                                return pr;
 
        if (path)