block: fix find_block_info() by label
[project/ubox.git] / 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)