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 941e4b8..aa37e24 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)